ShaderMaterial bug (GL_OES_standard_derivatives)

Hi guys – I think i found a bug in the Shader Material. I have re-created the bug on this jsFiddle:

http://jsfiddle.net/ABlueEyedMonkey/NwgKs/1/

Not too sure how/why this happening, but if you use a shader material and use the function ‘dFdx’ the tool crashes.

If you comment this line out:
“vec2 dSTdx = dFdx( vec2(1.0, 1.0) );”,

Then the shader works.

Is there some kind of initialization that needs to happen to get GL_OES_standard_derivatives initialized?

This issue is related to #3140

Author: Fantashit

1 thought on “ShaderMaterial bug (GL_OES_standard_derivatives)

  1. You are missing "#extension GL_OES_standard_derivatives : enable" from your shader code. Three.js adds it automatically for MeshPhongMaterial if the material has bumpMap or normalMap properties. I guess it differs between browsers and drivers and whatnot whether it is required.

Comments are closed.