Panda3D Manual: Known Shader Bugs and Limitations
  <<prev top next>>     

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 config-variable that you can use to suppress bleeding edge stuff:

basic-shaders-only #t


At some point, when functionality that is currently flaky becomes reliable, we may expand the definition of what constitutes 'basic' shaders.

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.

  <<prev top next>>