Torque Shader Engine DocumentationCVS Revision Label 0.1.x |
Detail textures are repeating, high frequency textures that are tiled and modulated over a material. They can give the impression that the material is of a higher resolution than it actually is.
Script reference: detailTex = filename
Bumpmaps give a material a more 3D appearance. The TSE supports bumpmaps through the use of normalmaps. There are many free utilities available to create normalmaps. nVIDIA has a nice PhotoShop plugin for this purpose available at developer.nvidia.com.
Script reference: bumpTex = filename
This value indicates what color the specular highlights on a material should be. Usually this is the same color as the light source that is lighting the material. Specular is additively applied to materials, so this value can also be used to control the intensity of the specular highlight. The darker the color, the less intense the highlight.
Script reference: specular = color
This is the "shininess" factor of specular highlights. The higher the number, the smaller the specular highlight and the shinier the material appears.
Script reference: specularPower = float
These are flags indicating which type of specular, if any, is applied to the material.
Pixel specular is not supported for cards that do not have pixel shader 2.0 compatibility. It is more accurate than vertex specular as it is calculated every pixel, but it is also more expensive.
Script reference: pixelSpecular = bool
Vertex Specular is not yet supported.
Flag indicating if material should glow. Glow amount is dictated by how "bright" a material is in color space. White will glow brightest, black will not glow at all.
Script reference: glow = bool
This flag removes any shading calculations performed on a material. It is useful for glowing objects that appear to emit light.
Script reference: emissive = bool
Indicates the blend operation to perform for a translucent stage. Options include additive, subtractive, multiplicative, and others. See material.h and the BlendOp enum for a complete list.
Script reference: translucentBlendOp = blendOp
Translucent materials do not write to the zbuffer by default. This parameter allows this to occur.
Script reference: translucentZWrite = bool
Useful for simulating reflective surface properties. Cubemaps are six sided "sky box" structures. See the CubemapData and GFXCubemap classes as well as the sample materials.cs file for more info. Also see Direct3D and OpenGL documentation.
Script reference: cubemap = filename
This is a flag indicating that the material is going to use a cubemap created by the scenegraph. Dynamic cubemaps are updated frequently for very realistice reflections. They are very expensive as a result.
Dynamic cubemaps only currently work for ShapeBase objects. To enable dynamic cubemapping on those objects, the flag dynamicReflection must be set to true for in an object's datablock. The dynamic cubemap is then rendered from that object's center every frame.
Script reference: dynamicCubemap = bool
Marks a material for dynamic planar reflections. For more info see Planar Reflections.
Script reference: planarReflection = bool
The animation flags on materials are for texture coordinate animation.
Scrolls the material in the direction and speed defined by scrollDir and scrollSpeed parameters in script.
Rotates the material with the rotPivotOffset and rotSpeed parameters indicating the pivot point in texture space and the rotation speed respectively.
This is a modifier flag for the Scroll, Rotate, and Scale properties. It can be controlled with the waveType, waveFreq, and waveAmp parameters indicating the type, frequencey and amplitude of the wave.
Sequences are a series of images that reside in a single texture. They are arranged in the horizontal of a texture and offset at regular intervals. The sequence texture doesn't need to be square, but it does need to be a power of two to work.
The sequenceFramePerSec parameter indicates how many sequence segments are displayed in a second. The parameter sequenceSegmentSize indicates the size of each segment in a sequence in texture space.
For example for a sequence of 4 32x32 images, create a 128x32 size texture. Then create the images side by side in the image. To show all four images in one second as a looping animation, set sequenceFramePerSec to be 4.0. The sequenceSegmentSize parameter should be set to 0.25 because there are 4 segments (1/4 = 0.25).