I have been trying to implement the sky shader example in my project but keep just getting a black ‘sky’. I struggled to get my local project working live anywhere - but it was based initially on this starter project.
I can’t see anything happening in the official example that doesn’t happen in this glitch app so i’m confused why it isn’t working.
The glitch link was broken so I have updated the original glitch ‘sky-shader-test’ - I hope the link works, i’m not sure what happened to the last one.
I’m trying to work out two things: why I can only get the sky working when i use GUI to input values and not when I want to hard code said values.
I have also noticed that the ‘exposure’ doesn’t act the same way that the example does. It affects the brightness of the cube but not the sky itself.
I couldn’t figure out how to get the glitch to rebuild bundle.js, but it’s probably because you’re only setting all the uniforms within the guiChanged method:
Thanks for looking. I use rollup -c "rollup_dev_config.js" -w
I will try again - initially I tried implementing without the GUI and setting the uniforms seperately, but kept being faced with a black render. Will update if I can recreate.
Thanks @Mugen87 I remixed and rebundled your glitch without making changes and it looks like this:
The ‘exposure’ now does what I expect with the sky, but no longer affects the cube. There are no lights in the scene - so how was the cube being lit previously? — strangely in my local project the loaded objects ARE affected by toneMappingExposure, but the sky is not. I’m currently reading through docs for both to try and understand.