Skip to content
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

Throws error when fog is active #26

Closed
awesomephant opened this Issue Jun 18, 2017 · 7 comments

Comments

Projects
None yet
5 participants
@awesomephant
Copy link

awesomephant commented Jun 18, 2017

I was trying to build a scene on the master branch of aframe using both fog and a particle system. This seems to break the particle component, throwing this error:

THREE.WebGLProgram: shader error:  0 gl.VALIDATE_STATUS false gl.getProgramInfoLog Varyings with the same name but different type, or statically used varyings in fragment shader are not declared in vertex shader: fogDepth

Test case

This doesn't happen on on aframe 0.5.0.

@weddingdj

This comment has been minimized.

Copy link
Contributor

weddingdj commented Jun 19, 2017

Could you file an issue in the a-frame repository? Maybe there has been a change related to the fog.

@kfarr

This comment has been minimized.

Copy link
Contributor

kfarr commented Dec 3, 2017

After @weddingdj PR adding THREE.ShaderChunk.fog_pars_vertex per advice from this issue on aframe core using aframe 0.7 I am now seeing a different error when using this particle system component along with fog:

In three.js:18003: THREE.WebGLProgram: shader error: 0
gl.VALIDATE_STATUS false gl.getProgramInfoLog invalid shaders
ERROR: 0:335: 'mvPosition' : undeclared identifier
ERROR: 0:335: 'z' : field selection requires structure or vector on left hand side

(In addition to the unhelpful THREE.WebGLShader: Shader couldn't compile.)

View sample project: https://fog-and-particles.glitch.me/
Code: https://glitch.com/edit/#!/fog-and-particles?path=index.html:47:27

@lukecarbis

This comment has been minimized.

Copy link

lukecarbis commented Dec 29, 2017

The same happens with the aframe environment component (https://github.com/feiss/aframe-environment-component) enabled.

@kfarr

This comment has been minimized.

Copy link
Contributor

kfarr commented Dec 29, 2017

@lukecarbis some presets on environment component include fog by default (hence this error), you can still use environment component if you disable fog by setting fog parameter to 0

@lukecarbis

This comment has been minimized.

Copy link

lukecarbis commented Dec 31, 2017

@kfarr Yes, can confirm. Definitely a problem related to fog. Another example here: https://github.com/lukecarbis/drone-attack

@ngokevin

This comment has been minimized.

Copy link
Collaborator

ngokevin commented Mar 3, 2018

Happens to me as well. Don't know if you need to update the SPE library to adjust.

@ngokevin

This comment has been minimized.

Copy link
Collaborator

ngokevin commented Dec 1, 2018

#46

@weddingdj weddingdj closed this Dec 4, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.