Game Development Community

Shaders/Effect files

by Christian Rousselle · in Torque X 2D · 08/08/2007 (8:33 am) · 2 replies

I am trying to figure out how to use custom shaders in TX. Digging through the documentation I found the Filename property with is a member of DefaultEffect. Can I simply use that and specify my effect file here (e.g. by adding this to the xml for an object already created)? How are things like BaseTex, NormalMap, Texture passed to the effect/shader? Is there some kind of tutorial or some hints how to use EffectFiles/shaders in TX?

Thank you.

#1
08/10/2007 (1:34 am)
Hm, let me rephrase this. Is there a tutorial or at least some hints of how to use shaders in Torque X?
#2
08/10/2007 (6:00 am)
I got this response from Tom a few weeks ago.

Quote:

We want to put a nice easy interface on this, but there are a few things we need to rework first. For example, right now all post-processing done in this way would apply to GUI controls aswell as scene objects, which is obviously not an ideal situation. You can circumvent this by resolving and re-rendering the scene before rendering any GUI controls, but right now there's no good interface for stuff like that.

In post-1.0 we'll have per-sceneview render targets and then a master render target so you'll have much greater control over how your effects are applied.


Right now it's not possible to do much without the TX source because you really need to modify the game loop.