If too many shadow-casting lights are active, too many TEXCOORD varyings will be used and a shader compilation error will be displayed. Instead, Panda will now just do the calculation in the fragment shader if not enough varyings are available. It's slower, but better than crashing.
* In C++ reference, only pick up classes defined in .h file
* Add a few excludes to C++ reference that aren't public API
* On class index pages, reduce number of columns
* Add @since for some methods/classes that are new in 1.10.0
* Fix/improve a few docstrings here and there
Even a brief error message in the assertion is infinitely more useful to a user who is not at home in the source code, especially for assertions that may reasonably be triggered by honest user mistakes.
This setting causes asserts when modifying certain material flags after they are assigned to a node, in case a shader has been generated that uses the materials, which cannot efficiently detect whether the material has changed. However, we already sort of have a (inefficient, but effective) solution for this in TextureStage (see #178) that we could just apply here as well: changing the material attributes after such a shader has been generated could call GraphicsStateGuardianBase::mark_rehash_generated_shaders().
In the future, we should replace the material model with one that does not require shader regeneration for such seemingly trivial property changes.
Fixes#370
This is designed to sanity-check the buildsystem, ensuring that the
expected BUILDING_ macros are defined at the expected time. It
also helps catch cases where the wrong BUILDING_/EXPCL_ macros
are used.
This fixes a regression that caused the wrong textures/stage settings to be applied when a texture stage was being optimized out (eg. when a normal map is present while lighting is disabled).
Gets rid of properties defined as both MAKE_SEQ_PROPERTY/MAKE_MAP_PROPERTY, which are just a bad idea. Instead, adds a way for map properties to define a separate "keys" interface.
Fixes: #203
A notable change is that the color scale is now applied *before* texture blending, matching the FFP. If this breaks anything, we might want to add a configuration option for this.
This also implements the remaining combine modes, CM_dot3_rgb and CM_dot3_rgba, and fixes the broken CM_subtract mode (which currently worked the same way as CM_add).
Fixes: #189
* Disable state munger, which isn't needed
* Reflect updates to TextureStage properties (Fixes#178)
* Also respect combine mode and rgb scale changes
* Allow rehashing and clearing generated shader cache
State munger is now disabled whenever any shader is applied. Panda assumes that any custom shader will apply color scale by itself.
This is done by:
* Not considering the texture pointer when looking up a generated shader, only type
* Not requiring different shaders based on RescaleNormalAttrib
* Not looking at AlphaTestAttrib unless it is going to be relevant
This should dramatically reduce the number of shaders that are being generated for many scenes, especially since the only thing that differs from object to object is often just the texture.
These changes are also necessary to make b781995ef1 more usable, since prepare_scene may see a slightly different state than is encountered at render time due to code in CullResult adding in an AlphaTestAttrib or RescaleNormalAttrib.