Shader generator errors out with some material property combinations

Bug #1219422 reported by Juha Jeronen
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Panda3D
Fix Released
Undecided
rdb

Bug Description

In the function ShaderGenerator::synthesize_shader(), contained in panda/src/pgraphnodes/shaderGenerator.cxx, there are some code paths that cause tot_diffuse to be used without being defined, specifically when light ramping is enabled. One of these is when a material has specular, but no diffuse or ambient.

This causes the generated shader to fail, reverting to the default renderer for the affected material, and printing an error message in the terminal.

The findings and a fix are reported here:

http://www.panda3d.org/forums/viewtopic.php?f=4&t=16329

Attached is a patch (against 1.8.1) containing a fix along the lines suggested by rdb in the forum thread.

Revision history for this message
Juha Jeronen (juha-jeronen) wrote :
Revision history for this message
rdb (rdb) wrote :

Checked in a fix, thanks.

Changed in panda3d:
assignee: nobody → rdb (rdb)
milestone: none → 1.9.0
status: New → Fix Committed
rdb (rdb)
Changed in panda3d:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers