1

I've been developing with Three.js over the past 3 months and have been using it on several browsers and computers just fine. Last week on my home computer, I get this error whenever I try and load my website:

three.js:29948 THREE.WebGLProgram: shader error:  0 gl.VALIDATE_STATUS false gl.getProgramInfoLog C:\fakepath(254,9-30): error X3004: undeclared identifier 'IncidentLight'

Warning: D3D shader compilation failed with default flags. (vs_3_0)
 Retrying with avoid flow control
C:\fakepath(254,9-30): error X3004: undeclared identifier 'webgl_45daf4aa877f103d'

Warning: D3D shader compilation failed with avoid flow control flags. (vs_3_0)
 Retrying with prefer flow control
C:\fakepath(254,9-30): error X3004: undeclared identifier 'webgl_45daf4aa877f103d'

Warning: D3D shader compilation failed with prefer flow control flags. (vs_3_0)
Failed to create D3D shaders.

The website is live and doesn't work on strictly a handful of computers but works on the computers at work. I've made sure to check if WebGL was enabled on the browsers where the site isn't working but it's enabled.

7
  • What makes you think it depends on a browser type? Commented Jun 3, 2016 at 15:08
  • @enkryptor That's typically the common reason when I research issues on Three.js working with some browsers and not others, so that's what I think this. Commented Jun 3, 2016 at 15:09
  • Does your shader require some webgl extensions? If I have to guess, some computer don't have the webgl extensions either your or three.js needs. Also, which version of Three.js do you have? Commented Jun 3, 2016 at 15:12
  • But is it your guess for now, or did you really tried to run it on your home computer with different browsers? What browsers do work, then? Commented Jun 3, 2016 at 15:12
  • I'm sorry if it sounded offensive, but you said "doesn't work on strictly a handful of computers but works on the computers at work", and it was about different computers, not different browsers. I was asking about different browsers on a same computer. Which of them do work and which do not? Commented Jun 3, 2016 at 15:17

1 Answer 1

3

That could be the known issue with certain hardware, appeared in a new Three.js version - https://github.com/mrdoob/three.js/issues/8161

The issue is fixed in the dev branch. There is a workaround though:

Compilation fails on functions IncidentLight getPointDirectLight and IncidentLight getDirectionalDirectLight. Modify those functions to void types:

void getDirectionalDirectLight( out IncidentLight directLight, const in DirectionalLight directionalLight, const in GeometricContext geometry );

void getPointDirectLight( out IncidentLight directLight, const in PointLight pointLight, const in GeometricContext geometry );
Sign up to request clarification or add additional context in comments.

1 Comment

A little more summary details may be nice, just in case that link went away.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.