Search Issue Tracker
Fixed in 5.4.0
[Shaders] Transparent shader writes into DepthNormals texture, because materials sometimes cache RenderType setting
Reproduction steps("video" attached):
1. Open attached project.
2. Select "Assets/Art/Transparent_Writes_Normals.mat".
3. Notice it uses the "Particles/Additive" shader.
4. Open and play "Assets/Scene.unity".
5. Open "Window/Frame" Debugger and enable it.
6. Select "RenderDeferred.ForwardObjectsIntoDepthNormals" node in Frame Debugger.
* Red plane renders with the "Particles/Additive" shader into DepthNormals.
* Green plane doesn't render with the "Particles/Additive" shader into DepthNormals.
* Materials should use the RenderType as specified in the shader.
* Issue is probably related to materials that have a cached "RenderType" value, which is set to "TransparentCutout" (the assigned shader does not use this RenderType though), which then renders the objects into DepthNormals.
* Changing the RenderType in a shader has no impact, if that value is cached in the material already.
* Created a separate case for the unremovable "RenderType" entry issue(807163).
Reproduces with: trunk,5.4,5.3. Possibly regression since 5.1 or so.
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
- [Linux Hub] A new instance of the Hub does not have a Taskbar icon
- Mesh Inspector becomes slow to use when inspecting a large Mesh with Blend Shapes
- [Metal] GfxDeviceMetal::CreateComputeProgram does not check inputs
- The Modes button of the the SerializedField MinMaxGradient is not clickable in the Inspector when indentLevel is more than 0
- Input.GetKey for Left Shift returns true when Right Shift is held down and Left Shift is pressed (and vice versa)