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
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.
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- ArgumentOutOfRangeException when manipulating the Project Settings search bar
- [Linux] Touch freezes in Player when any mouse button is clicked
- UnityEngine.Rendering.Volume.OnEnable() is called twice before OnDisable() creating multiple copies of the same volume when a volume is enabled right after Domain Reload when entering Play Mode
- Hinge Joint transforms are reset when toggling the "useMotor" property
- Motion Vector texture reports incorrect Mesh data when Mesh is coming from off-screen
Add comment