Output of vertex shader not read by fragment shader

Hi there,

I’m trying to create a realistic planet with atmospheric (rayleigh) scattering. I found a working (but quite old) fiddle: https://jsfiddle.net/VsWb9/770/

Which I adapted a little: https://jsfiddle.net/fwrdev/8r19mfb0/63/

Now I was trying to make use of a recent version of Three.js (in the Fiddle it’s r105 / locally it’s r142). So I adjusted the code: https://jsfiddle.net/fwrdev/prvfmx36/44/

But now, nothing is showing up. (Only) Firefox prints the following warnings in the console:

  • “THREE.WebGLProgram: gl.getProgramInfoLog()”, “WARNING: Output of vertex shader ‘webgl_d63a0821229be6c6’ not read by fragment shader WARNING: Output of vertex shader ‘webgl_d327da1c24539825’ not read by fragmentshader”

I also tried the WEBGL1Renderer in the hope, that this might would be the cause. Didn’t work, same warning.

So far, I found nothing that helped. Sadly, my ability to debug shader code is strongly limited (=zero).
Any help would be highly appreciated.

Hi! Already works?
image

Hi,
I wish it would…

Have you tried this fiddle (three.js version r105)?
https://jsfiddle.net/fwrdev/prvfmx36/44/

Black screen. No errors.

Should be

camera.position.set(eye.x, eye.y, eye.z);

This works on the latest version I believe:

Yes, it works with r142. Thank you so much! You made my day!

(FF is still showing the warning, but who cares :wink:

:+1:
I don’t see any warnings in FF, maybe it depends on the hardware or OS?
Without any specifics it’s hard to tell, it’s a hairy shader :upside_down_face:

Probably hardware/os.

Just for the record…

Yes, in the last weeks I was searching for more recent solutions. But without any knowledge about shaders, I need to stick with what is there. :slight_smile:
I’m short on time (end of semester), but over the next few months I’ll research this topic more deeply.
Thanks again!

1 Like