Known Bugs in the Shader Subsystem
Here is a list of known bugs, with workarounds:
Problem: Register Allocation.
Problem: nVidia's Cg compiler tries to assign registers to parameters. Under a variety of circumstances, the Cg compiler will assign the same register to two parameters, or to a parameter and to a constant in the program.
Workaround: We have found that if you manually allocate registers by supplying a semantic string for each parameter, this problem is bypassed.
Problem: Bad Target Languages.
Problem: nVidia's Cg compiler will choose one of several different "target" languages to translate the Cg program into. When the Cg compiler tries to translate the program into the VP40/FP40 language, it often produces incorrect output.
Workaround: We have discovered that translation into ARBVP1/ARBFP1 seems to work reliably. Since that language is supported on essentially every video card, it is usually safe to translate into that language. We have provided a directive where you can recommend a target language to the Cg compiler:
//Cg profile arbvp1 arbfp1
If you supply this directive, it will use the recommended language. If you supply more than one directive, it will try the languages in the order provided.
Problem: Untested/Unfinished DirectX Support.
Problem: Shader development is currently being done in OpenGL. The DirectX support typically lags behind, and is often less fully-tested.
Workaround: The default setting for Panda is to use OpenGL, not DirectX. For now, when using shaders, do not change this setting.
|