Search Issue Tracker
By Design
Votes
0
Found in
2021.3.33f1
2022.3.15f1
2023.2.4f1
2023.3.0a19
Issue ID
UUM-59092
Regression
No
Backface stencil doesn't work when used in WebGL Build
How to reproduce:
1. Open the attached project "WebGLStencilTest2022.zip"
2. Build And Run the project for WebGL
Expected results: Backface stencil works in the WebGL Player
Actual results: Backface stencil doesn't work in the WebGL Player
Reproducible with: 2021.3.33f1, 2022.3.15f1, 2023.2.4f1, 2023.3.0a19
Reproducible on: Windows 11 22H2
Not reproducible on: No other environment tested
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Shader Graph Node information is briefly displayed in Graph Inspector when clicking on Category in the Blackboard
- Module installation fails with "Download failed: Validation Failed" errors when using beta.2 Hub version
- JsonConvert conversion fails trying to call GetCallbackMethodsForType when [OnDeserialized] is used in a class
- Shader Graph Category dropdown cannot be expanded/collapsed when clicking on the text
- Different text alignment in the column header in Entities "System" window
Resolution Note:
There are a couple issues in the project that are causing the differences between WebGL and the Editor.
1. The Quality mode for Standalone is set to High Fidelity, but the Quality mode for Web is set to Balanced. The render setup was done for High Fidelity but not Balanced, so the web build will not have any of that render setup. Change the Quality setting for Web to High Fidelity to get the same render settings.
2. ModCubeMaterial points to GeneratedFromGraph-ModCubeShader. It looks like the Cull mode was edited for the shader. But it was only changed for the first SubShader, which excludes the GLES renderers. There is a second SubShader that is for the GLES renderers, and the Cull and Stencil values were not changed there. I copied the Render State values from the first subshader to the second one so that the GLES and non-GLES subshaders are consistent.
After I changed these two things WebGL rendered in the expected way.
The same issues would have been seen if you changed the Standalone graphics API to OpenGLES3.