Search Issue Tracker

Fixed in 4.5.X

Votes

0

Found in

4.1.0f4

Issue ID

533574

Regression

No

Problem with per-material shader keywords

Shaders

-

1. Run the scene "ShaderKeywordBugScene"
The scene has one cube with a material that includes a keyword"KEYWORD_OFF", that renders the cube in green. Setting "KEYWORD_ON" would render the cube in red.
2. Press the button "A: Read renderer.shaderMaterial.shaderKeywords".
This will read the shader keywords from the cube's shared material,
and print them on screen. Should print out "shared shaderKeywords: KEYWORD_OFF".
The cube should remain green.
3. Press the button "B: Read renderer.material.shaderKeywords".
This will read the shader keywords from the cube's material,
and print them on screen. Reading the materials properties creates an instance of the material, and all keywords are lost, and printout should be "No shaderKeywords found in material".
Also, the cube has now turned red as it's behaviour defaults to KEYWORD_ON, although no keywords are present.

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.