Search Issue Tracker
By Design
Votes
0
Found in
2018.3.0f2
Issue ID
1114941
Regression
No
[WebGL] 3D texture lookups (tex3Dlod in shader) are always 0
Steps to reproduce:
1. How we can reproduce it using the example you attached
2. Run demo scene.
3. Try to show medium heavy clouds in cloud dropdown.
4. Notice only the 2D texture (cirrus clouds) shows up.
Expected result: Volumetric clouds shows up like in other build targets
Actual result: Volumetric clouds do not show up.
Reproduced in: 2018.3.4f1
Note:
1. Other platforms show the volumetric clouds.
2. WeatherMakerCloudVolumetricShaderInclude.cginc, line 510 which always returns 0.
3. 3D texture preview does not work in WebGL mode. It works for other modes like desktop.
4. Project breaks in any other Unity version. Tried downloading Weather Maker from the asset store, but it also breaks when switching target to Webgl.
5. Included videos showing a comparison between webgl and other platforms.
Comments (2)
-
Peter77
Jan 04, 2020 18:42
Related forum thread:
https://forum.unity.com/threads/tex3dlod-in-metal-broken-for-years.711254/#post-4840127 -
jjxtra
Aug 09, 2019 15:32
Please note this was actually a problem with a continue statement in the shader throwing off the compiler some how. Removing the continue has fixed the problem, except for WebGL.
Even on WebGL 2.0, a simple tex3Dlod shader always returns 0.
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
- Crash on RaiseException when opening a specific project
- DownloadHandlerScript.CompleteContent is called twice when building for WebGL
- Scene view has Y coordinates of the Screen Position node flipped when some of the URP features are disabled
- Volumetric fog shader variants are missing from build when "Strict Shader Variant Matching" is disabled
- Unnecessary modifications clutter the Scene when using a RectTransform driven by a LayoutGroup in a Prefab
Resolution Note:
The quality level for WebGL was set to Fastest, which has volumetric clouds disabled. Changing the quality level to Good will enable the volumetric clouds. However, there is a framebuffer readback loop (active Render Texture used as shader input) which is not allowed in WebGL (and undefined though sometimes permitted behavior on other platforms). You will need to use multiple framebuffers and cycle them to achieve this with WebGL.