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

WebGL

-

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.

  1. 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.

Comments (2)

  1. 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

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.