New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Examples: Problem with webgl_shaders_ocean #12312
Comments
I've just run the example in the current The geometries did not change much in the PR, the fragment shader just includes the needed chunks to call Does the error message log what is at |
Unfortunately not. The logged fragment shader gets cut off after line 27 😒 |
If i remove the shader chunks in the fragment shader ( |
apologies for the question, but is there a [...] at the end of the shader log where it gets cut off? |
@moraxy Thanks for that advice! When i click on [...], i can see the whole program.
|
The only sampler that gets indexed with a non-constant expression seems to be
|
Other shadow map examples work. It has to do something with the |
Same conclusion. It also reports a warning for an en extension at line 2 that is not visible, so it may be referring to a different code that what is logged ? Same issue as in #6115 by the way As @moraxy stated and the issue suggests, it may be linked to shadows since the only sampler array with a non-const expression is there : what if you remove I'm digging that shader in case I have any idea in the meanwhile... |
That solves the problem. |
@Mugen87 does the shadows in the spline editor example work for you ? (I copied the chunks of the ShadowMaterial to get the shadows in the water shader) |
Yep, |
Loop unrolling? There should be a flag or directive or something to force enable/disable it per loop |
Does the renderer achieves the loop unrolling internally with this chunk in built-in materials (it is used in Shadow and Lambert materials) and not with ShaderMaterial ? |
How do we deal with this ? |
Good question. I remember there was a feature request of a user who asked for an example that shows, how to apply lighting + shadows on a custom shader material (unfortunately, i can't find the issue right now). But we would run into the same error when implementing this. I'm not sure how to solve this problem. Let's wait how @mrdoob and @WestLangley evaluate the issue. |
As a user myself this is a big question, because in GPGPU cases we can use huge Both keeping and removing this condition seems to cause issues somewhere. @moraxy has mentionned using a flag, which would then look like the only exit door... ? But this is a special policy to introduce then. This is also the general problem of customizing shaders I guess, with all the SO questions and issues going on... I love I let you solve this 😇 |
I guess we could try adding a if ( material.isShaderMaterial === undefined || material.unrollLoops === true ) { |
Sounds good! |
What's this shader inspector you posted the screenshot of? |
@pailhead That's WebGL Inspector, available as an extension for Chrome and Firefox. |
This bug is now fixed via #13140. Yay! 🎉 🙌 |
Description of the problem
I've discovered today that the current
dev
version of webgl_shaders_ocean does not work with Firefox 55.0.2 and Ubuntu 16.04 LTS. The water does not appear and i see some error messages in the browser console.And
The problem does not occur with Chromium. Besides, the live version of
webgl_shaders_ocean
works. So this error probably exists since the latest changes ofTHREE.Water
, see #12167. If i revert the PR, the error does not appear./ping @Astrak
Three.js version
Browser
OS
Hardware Requirements (graphics card, VR Device, ...)
The text was updated successfully, but these errors were encountered: