Game Development Community

Variables

by Joshua Horns · in Torque 3D Professional · 08/13/2009 (6:29 am) · 2 replies

At the risk of being annoying...(I know this is beta)

Is there eventually going to be documentation on symbols used in the shader scripts? Or if it exists could someone point me there?

I would really like to know what the difference between $ and # is.

Also, the exact contents of #prepass(but not just prepass, ALL of the buffers), to include buffer format and how the buffer is packed.

I'd also like to see some explicit documentation on the rendermanager.

Please don't take this as a complaint, I know it's still beta. However, with the lack of direct documentation in the code I don't envy whoever is going to go behind and document it. Doxygen anyone?

I feel like for a professional development tool I shouldn't have to reverse-engineer it in order to understand how to use it. (again I know it's beta).

This is not intended to be a flame thread.

**edit TDN has some decent docs on scripting but I still couldn't find #.

#1
08/13/2009 (8:35 am)
The # is new to TorqueScript as far as I'm aware, but judging from it's usage I would assume it signifies a pre-defined, reference to a render target passed from the engine or possibly the shaders. I would expect this feature will be documented as, looking at the T3D documentation, there appears to be far more on it's way to being documented then was ever done in TDN with previous engines.
#2
08/13/2009 (9:03 am)
Actually, the # isn't part of script at all. It's just used to differentiate between texture filenames and the names of render targets or other dynamic buffers.

I'm sure there'll be detailed docs on the rendering system, but if you want to know right now what each # texture is used for, just search for it in the source code (without the # and wrapped in quotes).

The $ is used in shaders to access their constants.