Created
September 15, 2015 13:50
-
-
Save theoryshaw/2cbafc9f5759dc9d6d97 to your computer and use it in GitHub Desktop.
xeoengine errors
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
xeoengine.js:990 [ERROR] [XEO.GameObject 10]: Draw program failed to validate | |
Vertex shader: | |
uniform mat4 xeo_uModelMatrix; | |
uniform mat4 xeo_uViewMatrix; | |
uniform mat4 xeo_uProjMatrix; | |
uniform vec3 xeo_uEye; | |
attribute vec3 xeo_aPosition; | |
varying vec4 xeo_vViewPosition; | |
varying vec3 xeo_vViewEyeVec; | |
attribute vec3 xeo_aNormal; | |
uniform mat4 xeo_uModelNormalMatrix; | |
uniform mat4 xeo_uViewNormalMatrix; | |
varying vec3 xeo_vViewNormal; | |
uniform vec3 xeo_uLightDir1; | |
varying vec4 xeo_vViewLightVecAndDist1; | |
uniform vec3 xeo_uLightDir2; | |
varying vec4 xeo_vViewLightVecAndDist2; | |
void main(void) { | |
vec4 modelPosition = vec4(xeo_aPosition, 1.0); | |
vec4 modelNormal = vec4(xeo_aNormal, 0.0); | |
mat4 modelMatrix = xeo_uModelMatrix; | |
mat4 viewMatrix = xeo_uViewMatrix; | |
mat4 modelNormalMatrix = xeo_uModelNormalMatrix; | |
mat4 viewNormalMatrix = xeo_uViewNormalMatrix; | |
vec4 worldPosition; | |
worldPosition = modelMatrix * modelPosition; | |
vec4 viewPosition = viewMatrix * worldPosition; | |
vec3 worldNormal = (modelNormalMatrix * modelNormal).xyz; | |
xeo_vViewNormal = (viewNormalMatrix * vec4(worldNormal, 1.0)).xyz; | |
xeo_vViewPosition = viewPosition; | |
vec3 tmpVec3; | |
tmpVec3 = xeo_uLightDir1; | |
xeo_vViewLightVecAndDist1 = vec4(-tmpVec3, 0.0); | |
tmpVec3 = xeo_uLightDir2; | |
xeo_vViewLightVecAndDist2 = vec4(-tmpVec3, 0.0); | |
xeo_vViewEyeVec = ((viewMatrix * vec4(xeo_uEye, 0.0)).xyz - viewPosition.xyz); | |
gl_Position = xeo_uProjMatrix * viewPosition; | |
} | |
Fragment shader: | |
precision highp float; | |
varying vec4 xeo_vViewPosition; | |
uniform vec3 xeo_uDiffuse; | |
uniform vec3 xeo_uSpecular; | |
uniform vec3 xeo_uEmissive; | |
uniform float xeo_uOpacity; | |
uniform float xeo_uShininess; | |
uniform float xeo_uReflectivity; | |
uniform vec3 xeo_uLightAmbientColor; | |
uniform float xeo_uLightAmbientIntensity; | |
varying vec3 xeo_vViewEyeVec; | |
varying vec3 xeo_vViewNormal; | |
uniform vec3 xeo_uLightColor1; | |
uniform float xeo_uLightIntensity1; | |
varying vec4 xeo_vViewLightVecAndDist1; | |
uniform vec3 xeo_uLightColor2; | |
uniform float xeo_uLightIntensity2; | |
varying vec4 xeo_vViewLightVecAndDist2; | |
void main(void) { | |
vec3 ambient = xeo_uLightAmbientColor; | |
vec3 diffuse = xeo_uDiffuse; | |
vec3 specular = xeo_uSpecular; | |
vec3 emissive = xeo_uEmissive; | |
float opacity = xeo_uOpacity; | |
float shininess = xeo_uShininess; | |
float reflectivity = xeo_uReflectivity; | |
vec3 viewNormalVec = normalize(xeo_vViewNormal); | |
vec3 diffuseLight = vec3(0.0, 0.0, 0.0); | |
vec3 specularLight = vec3(0.0, 0.0, 0.0); | |
vec3 viewLightVec; | |
float dotN; | |
float lightDist; | |
float attenuation; | |
viewLightVec = normalize(xeo_vViewLightVecAndDist1.xyz); | |
dotN = max(dot(viewNormalVec, viewLightVec), 0.0); | |
diffuseLight += dotN * xeo_uLightColor1; | |
specularLight += specular * xeo_uLightIntensity1 * pow(max(dot(reflect(-viewLightVec, -viewNormalVec), normalize(-xeo_vViewPosition.xyz)), 0.0), shininess); | |
viewLightVec = normalize(xeo_vViewLightVecAndDist2.xyz); | |
dotN = max(dot(viewNormalVec, viewLightVec), 0.0); | |
diffuseLight += dotN * xeo_uLightColor2; | |
specularLight += specular * xeo_uLightIntensity2 * pow(max(dot(reflect(-viewLightVec, -viewNormalVec), normalize(-xeo_vViewPosition.xyz)), 0.0), shininess); | |
gl_FragColor = vec4( (specularLight * specular) + (diffuse * (diffuseLight + ambient * xeo_uLightAmbientIntensity)) + emissive, opacity); | |
}XEO.Component.Class.extend.error @ xeoengine.js:990XEO.GameObject.XEO.Component.extend._compile @ xeoengine.js:14631XEO.Scene.XEO.Component.extend._compile @ xeoengine.js:2420frame @ xeoengine.js:92 | |
xeoengine.js:990 [ERROR] [XEO.GameObject 14]: Draw program failed to validate | |
Vertex shader: | |
uniform mat4 xeo_uModelMatrix; | |
uniform mat4 xeo_uViewMatrix; | |
uniform mat4 xeo_uProjMatrix; | |
uniform vec3 xeo_uEye; | |
attribute vec3 xeo_aPosition; | |
varying vec4 xeo_vViewPosition; | |
varying vec3 xeo_vViewEyeVec; | |
attribute vec3 xeo_aNormal; | |
uniform mat4 xeo_uModelNormalMatrix; | |
uniform mat4 xeo_uViewNormalMatrix; | |
varying vec3 xeo_vViewNormal; | |
uniform vec3 xeo_uLightDir1; | |
varying vec4 xeo_vViewLightVecAndDist1; | |
uniform vec3 xeo_uLightDir2; | |
varying vec4 xeo_vViewLightVecAndDist2; | |
void main(void) { | |
vec4 modelPosition = vec4(xeo_aPosition, 1.0); | |
vec4 modelNormal = vec4(xeo_aNormal, 0.0); | |
mat4 modelMatrix = xeo_uModelMatrix; | |
mat4 viewMatrix = xeo_uViewMatrix; | |
mat4 modelNormalMatrix = xeo_uModelNormalMatrix; | |
mat4 viewNormalMatrix = xeo_uViewNormalMatrix; | |
vec4 worldPosition; | |
worldPosition = modelMatrix * modelPosition; | |
vec4 viewPosition = viewMatrix * worldPosition; | |
vec3 worldNormal = (modelNormalMatrix * modelNormal).xyz; | |
xeo_vViewNormal = (viewNormalMatrix * vec4(worldNormal, 1.0)).xyz; | |
xeo_vViewPosition = viewPosition; | |
vec3 tmpVec3; | |
tmpVec3 = xeo_uLightDir1; | |
xeo_vViewLightVecAndDist1 = vec4(-tmpVec3, 0.0); | |
tmpVec3 = xeo_uLightDir2; | |
xeo_vViewLightVecAndDist2 = vec4(-tmpVec3, 0.0); | |
xeo_vViewEyeVec = ((viewMatrix * vec4(xeo_uEye, 0.0)).xyz - viewPosition.xyz); | |
gl_Position = xeo_uProjMatrix * viewPosition; | |
} | |
Fragment shader: | |
precision highp float; | |
varying vec4 xeo_vViewPosition; | |
uniform vec3 xeo_uDiffuse; | |
uniform vec3 xeo_uSpecular; | |
uniform vec3 xeo_uEmissive; | |
uniform float xeo_uOpacity; | |
uniform float xeo_uShininess; | |
uniform float xeo_uReflectivity; | |
uniform vec3 xeo_uLightAmbientColor; | |
uniform float xeo_uLightAmbientIntensity; | |
varying vec3 xeo_vViewEyeVec; | |
varying vec3 xeo_vViewNormal; | |
uniform vec3 xeo_uLightColor1; | |
uniform float xeo_uLightIntensity1; | |
varying vec4 xeo_vViewLightVecAndDist1; | |
uniform vec3 xeo_uLightColor2; | |
uniform float xeo_uLightIntensity2; | |
varying vec4 xeo_vViewLightVecAndDist2; | |
void main(void) { | |
vec3 ambient = xeo_uLightAmbientColor; | |
vec3 diffuse = xeo_uDiffuse; | |
vec3 specular = xeo_uSpecular; | |
vec3 emissive = xeo_uEmissive; | |
float opacity = xeo_uOpacity; | |
float shininess = xeo_uShininess; | |
float reflectivity = xeo_uReflectivity; | |
vec3 viewNormalVec = normalize(xeo_vViewNormal); | |
vec3 diffuseLight = vec3(0.0, 0.0, 0.0); | |
vec3 specularLight = vec3(0.0, 0.0, 0.0); | |
vec3 viewLightVec; | |
float dotN; | |
float lightDist; | |
float attenuation; | |
viewLightVec = normalize(xeo_vViewLightVecAndDist1.xyz); | |
dotN = max(dot(viewNormalVec, viewLightVec), 0.0); | |
diffuseLight += dotN * xeo_uLightColor1; | |
specularLight += specular * xeo_uLightIntensity1 * pow(max(dot(reflect(-viewLightVec, -viewNormalVec), normalize(-xeo_vViewPosition.xyz)), 0.0), shininess); | |
viewLightVec = normalize(xeo_vViewLightVecAndDist2.xyz); | |
dotN = max(dot(viewNormalVec, viewLightVec), 0.0); | |
diffuseLight += dotN * xeo_uLightColor2; | |
specularLight += specular * xeo_uLightIntensity2 * pow(max(dot(reflect(-viewLightVec, -viewNormalVec), normalize(-xeo_vViewPosition.xyz)), 0.0), shininess); | |
gl_FragColor = vec4( (specularLight * specular) + (diffuse * (diffuseLight + ambient * xeo_uLightAmbientIntensity)) + emissive, opacity); | |
}XEO.Component.Class.extend.error @ xeoengine.js:990XEO.GameObject.XEO.Component.extend._compile @ xeoengine.js:14631XEO.Scene.XEO.Component.extend._compile @ xeoengine.js:2420frame @ xeoengine.js:92 | |
xeoengine.js:990 [ERROR] [XEO.GameObject 18]: Draw program failed to validate | |
Vertex shader: | |
uniform mat4 xeo_uModelMatrix; | |
uniform mat4 xeo_uViewMatrix; | |
uniform mat4 xeo_uProjMatrix; | |
uniform vec3 xeo_uEye; | |
attribute vec3 xeo_aPosition; | |
varying vec4 xeo_vViewPosition; | |
varying vec3 xeo_vViewEyeVec; | |
attribute vec3 xeo_aNormal; | |
uniform mat4 xeo_uModelNormalMatrix; | |
uniform mat4 xeo_uViewNormalMatrix; | |
varying vec3 xeo_vViewNormal; | |
uniform vec3 xeo_uLightDir1; | |
varying vec4 xeo_vViewLightVecAndDist1; | |
uniform vec3 xeo_uLightDir2; | |
varying vec4 xeo_vViewLightVecAndDist2; | |
void main(void) { | |
vec4 modelPosition = vec4(xeo_aPosition, 1.0); | |
vec4 modelNormal = vec4(xeo_aNormal, 0.0); | |
mat4 modelMatrix = xeo_uModelMatrix; | |
mat4 viewMatrix = xeo_uViewMatrix; | |
mat4 modelNormalMatrix = xeo_uModelNormalMatrix; | |
mat4 viewNormalMatrix = xeo_uViewNormalMatrix; | |
vec4 worldPosition; | |
worldPosition = modelMatrix * modelPosition; | |
vec4 viewPosition = viewMatrix * worldPosition; | |
vec3 worldNormal = (modelNormalMatrix * modelNormal).xyz; | |
xeo_vViewNormal = (viewNormalMatrix * vec4(worldNormal, 1.0)).xyz; | |
xeo_vViewPosition = viewPosition; | |
vec3 tmpVec3; | |
tmpVec3 = xeo_uLightDir1; | |
xeo_vViewLightVecAndDist1 = vec4(-tmpVec3, 0.0); | |
tmpVec3 = xeo_uLightDir2; | |
xeo_vViewLightVecAndDist2 = vec4(-tmpVec3, 0.0); | |
xeo_vViewEyeVec = ((viewMatrix * vec4(xeo_uEye, 0.0)).xyz - viewPosition.xyz); | |
gl_Position = xeo_uProjMatrix * viewPosition; | |
} | |
Fragment shader: | |
precision highp float; | |
varying vec4 xeo_vViewPosition; | |
uniform vec3 xeo_uDiffuse; | |
uniform vec3 xeo_uSpecular; | |
uniform vec3 xeo_uEmissive; | |
uniform float xeo_uOpacity; | |
uniform float xeo_uShininess; | |
uniform float xeo_uReflectivity; | |
uniform vec3 xeo_uLightAmbientColor; | |
uniform float xeo_uLightAmbientIntensity; | |
varying vec3 xeo_vViewEyeVec; | |
varying vec3 xeo_vViewNormal; | |
uniform vec3 xeo_uLightColor1; | |
uniform float xeo_uLightIntensity1; | |
varying vec4 xeo_vViewLightVecAndDist1; | |
uniform vec3 xeo_uLightColor2; | |
uniform float xeo_uLightIntensity2; | |
varying vec4 xeo_vViewLightVecAndDist2; | |
void main(void) { | |
vec3 ambient = xeo_uLightAmbientColor; | |
vec3 diffuse = xeo_uDiffuse; | |
vec3 specular = xeo_uSpecular; | |
vec3 emissive = xeo_uEmissive; | |
float opacity = xeo_uOpacity; | |
float shininess = xeo_uShininess; | |
float reflectivity = xeo_uReflectivity; | |
vec3 viewNormalVec = normalize(xeo_vViewNormal); | |
vec3 diffuseLight = vec3(0.0, 0.0, 0.0); | |
vec3 specularLight = vec3(0.0, 0.0, 0.0); | |
vec3 viewLightVec; | |
float dotN; | |
float lightDist; | |
float attenuation; | |
viewLightVec = normalize(xeo_vViewLightVecAndDist1.xyz); | |
dotN = max(dot(viewNormalVec, viewLightVec), 0.0); | |
diffuseLight += dotN * xeo_uLightColor1; | |
specularLight += specular * xeo_uLightIntensity1 * pow(max(dot(reflect(-viewLightVec, -viewNormalVec), normalize(-xeo_vViewPosition.xyz)), 0.0), shininess); | |
viewLightVec = normalize(xeo_vViewLightVecAndDist2.xyz); | |
dotN = max(dot(viewNormalVec, viewLightVec), 0.0); | |
diffuseLight += dotN * xeo_uLightColor2; | |
specularLight += specular * xeo_uLightIntensity2 * pow(max(dot(reflect(-viewLightVec, -viewNormalVec), normalize(-xeo_vViewPosition.xyz)), 0.0), shininess); | |
gl_FragColor = vec4( (specularLight * specular) + (diffuse * (diffuseLight + ambient * xeo_uLightAmbientIntensity)) + emissive, opacity); | |
}XEO.Component.Class.extend.error @ xeoengine.js:990XEO.GameObject.XEO.Component.extend._compile @ xeoengine.js:14631XEO.Scene.XEO.Component.extend._compile @ xeoengine.js:2420frame @ xeoengine.js:92 | |
xeoengine.js:990 [ERROR] [XEO.GameObject 22]: Draw program failed to validate | |
Vertex shader: | |
uniform mat4 xeo_uModelMatrix; | |
uniform mat4 xeo_uViewMatrix; | |
uniform mat4 xeo_uProjMatrix; | |
uniform vec3 xeo_uEye; | |
attribute vec3 xeo_aPosition; | |
varying vec4 xeo_vViewPosition; | |
varying vec3 xeo_vViewEyeVec; | |
attribute vec3 xeo_aNormal; | |
uniform mat4 xeo_uModelNormalMatrix; | |
uniform mat4 xeo_uViewNormalMatrix; | |
varying vec3 xeo_vViewNormal; | |
uniform vec3 xeo_uLightDir1; | |
varying vec4 xeo_vViewLightVecAndDist1; | |
uniform vec3 xeo_uLightDir2; | |
varying vec4 xeo_vViewLightVecAndDist2; | |
void main(void) { | |
vec4 modelPosition = vec4(xeo_aPosition, 1.0); | |
vec4 modelNormal = vec4(xeo_aNormal, 0.0); | |
mat4 modelMatrix = xeo_uModelMatrix; | |
mat4 viewMatrix = xeo_uViewMatrix; | |
mat4 modelNormalMatrix = xeo_uModelNormalMatrix; | |
mat4 viewNormalMatrix = xeo_uViewNormalMatrix; | |
vec4 worldPosition; | |
worldPosition = modelMatrix * modelPosition; | |
vec4 viewPosition = viewMatrix * worldPosition; | |
vec3 worldNormal = (modelNormalMatrix * modelNormal).xyz; | |
xeo_vViewNormal = (viewNormalMatrix * vec4(worldNormal, 1.0)).xyz; | |
xeo_vViewPosition = viewPosition; | |
vec3 tmpVec3; | |
tmpVec3 = xeo_uLightDir1; | |
xeo_vViewLightVecAndDist1 = vec4(-tmpVec3, 0.0); | |
tmpVec3 = xeo_uLightDir2; | |
xeo_vViewLightVecAndDist2 = vec4(-tmpVec3, 0.0); | |
xeo_vViewEyeVec = ((viewMatrix * vec4(xeo_uEye, 0.0)).xyz - viewPosition.xyz); | |
gl_Position = xeo_uProjMatrix * viewPosition; | |
} | |
Fragment shader: | |
precision highp float; | |
varying vec4 xeo_vViewPosition; | |
uniform vec3 xeo_uDiffuse; | |
uniform vec3 xeo_uSpecular; | |
uniform vec3 xeo_uEmissive; | |
uniform float xeo_uOpacity; | |
uniform float xeo_uShininess; | |
uniform float xeo_uReflectivity; | |
uniform vec3 xeo_uLightAmbientColor; | |
uniform float xeo_uLightAmbientIntensity; | |
varying vec3 xeo_vViewEyeVec; | |
varying vec3 xeo_vViewNormal; | |
uniform vec3 xeo_uLightColor1; | |
uniform float xeo_uLightIntensity1; | |
varying vec4 xeo_vViewLightVecAndDist1; | |
uniform vec3 xeo_uLightColor2; | |
uniform float xeo_uLightIntensity2; | |
varying vec4 xeo_vViewLightVecAndDist2; | |
void main(void) { | |
vec3 ambient = xeo_uLightAmbientColor; | |
vec3 diffuse = xeo_uDiffuse; | |
vec3 specular = xeo_uSpecular; | |
vec3 emissive = xeo_uEmissive; | |
float opacity = xeo_uOpacity; | |
float shininess = xeo_uShininess; | |
float reflectivity = xeo_uReflectivity; | |
vec3 viewNormalVec = normalize(xeo_vViewNormal); | |
vec3 diffuseLight = vec3(0.0, 0.0, 0.0); | |
vec3 specularLight = vec3(0.0, 0.0, 0.0); | |
vec3 viewLightVec; | |
float dotN; | |
float lightDist; | |
float attenuation; | |
viewLightVec = normalize(xeo_vViewLightVecAndDist1.xyz); | |
dotN = max(dot(viewNormalVec, viewLightVec), 0.0); | |
diffuseLight += dotN * xeo_uLightColor1; | |
specularLight += specular * xeo_uLightIntensity1 * pow(max(dot(reflect(-viewLightVec, -viewNormalVec), normalize(-xeo_vViewPosition.xyz)), 0.0), shininess); | |
viewLightVec = normalize(xeo_vViewLightVecAndDist2.xyz); | |
dotN = max(dot(viewNormalVec, viewLightVec), 0.0); | |
diffuseLight += dotN * xeo_uLightColor2; | |
specularLight += specular * xeo_uLightIntensity2 * pow(max(dot(reflect(-viewLightVec, -viewNormalVec), normalize(-xeo_vViewPosition.xyz)), 0.0), shininess); | |
gl_FragColor = vec4( (specularLight * specular) + (diffuse * (diffuseLight + ambient * xeo_uLightAmbientIntensity)) + emissive, opacity); | |
}XEO.Component.Class.extend.error @ xeoengine.js:990XEO.GameObject.XEO.Component.extend._compile @ xeoengine.js:14631XEO.Scene.XEO.Component.extend._compile @ xeoengine.js:2420frame @ xeoengine.js:92 | |
xeoengine.js:990 [ERROR] [XEO.GameObject 26]: Draw program failed to validate | |
Vertex shader: | |
uniform mat4 xeo_uModelMatrix; | |
uniform mat4 xeo_uViewMatrix; | |
uniform mat4 xeo_uProjMatrix; | |
uniform vec3 xeo_uEye; | |
attribute vec3 xeo_aPosition; | |
varying vec4 xeo_vViewPosition; | |
varying vec3 xeo_vViewEyeVec; | |
attribute vec3 xeo_aNormal; | |
uniform mat4 xeo_uModelNormalMatrix; | |
uniform mat4 xeo_uViewNormalMatrix; | |
varying vec3 xeo_vViewNormal; | |
uniform vec3 xeo_uLightDir1; | |
varying vec4 xeo_vViewLightVecAndDist1; | |
uniform vec3 xeo_uLightDir2; | |
varying vec4 xeo_vViewLightVecAndDist2; | |
void main(void) { | |
vec4 modelPosition = vec4(xeo_aPosition, 1.0); | |
vec4 modelNormal = vec4(xeo_aNormal, 0.0); | |
mat4 modelMatrix = xeo_uModelMatrix; | |
mat4 viewMatrix = xeo_uViewMatrix; | |
mat4 modelNormalMatrix = xeo_uModelNormalMatrix; | |
mat4 viewNormalMatrix = xeo_uViewNormalMatrix; | |
vec4 worldPosition; | |
worldPosition = modelMatrix * modelPosition; | |
vec4 viewPosition = viewMatrix * worldPosition; | |
vec3 worldNormal = (modelNormalMatrix * modelNormal).xyz; | |
xeo_vViewNormal = (viewNormalMatrix * vec4(worldNormal, 1.0)).xyz; | |
xeo_vViewPosition = viewPosition; | |
vec3 tmpVec3; | |
tmpVec3 = xeo_uLightDir1; | |
xeo_vViewLightVecAndDist1 = vec4(-tmpVec3, 0.0); | |
tmpVec3 = xeo_uLightDir2; | |
xeo_vViewLightVecAndDist2 = vec4(-tmpVec3, 0.0); | |
xeo_vViewEyeVec = ((viewMatrix * vec4(xeo_uEye, 0.0)).xyz - viewPosition.xyz); | |
gl_Position = xeo_uProjMatrix * viewPosition; | |
} | |
Fragment shader: | |
precision highp float; | |
varying vec4 xeo_vViewPosition; | |
uniform vec3 xeo_uDiffuse; | |
uniform vec3 xeo_uSpecular; | |
uniform vec3 xeo_uEmissive; | |
uniform float xeo_uOpacity; | |
uniform float xeo_uShininess; | |
uniform float xeo_uReflectivity; | |
uniform vec3 xeo_uLightAmbientColor; | |
uniform float xeo_uLightAmbientIntensity; | |
varying vec3 xeo_vViewEyeVec; | |
varying vec3 xeo_vViewNormal; | |
uniform vec3 xeo_uLightColor1; | |
uniform float xeo_uLightIntensity1; | |
varying vec4 xeo_vViewLightVecAndDist1; | |
uniform vec3 xeo_uLightColor2; | |
uniform float xeo_uLightIntensity2; | |
varying vec4 xeo_vViewLightVecAndDist2; | |
void main(void) { | |
vec3 ambient = xeo_uLightAmbientColor; | |
vec3 diffuse = xeo_uDiffuse; | |
vec3 specular = xeo_uSpecular; | |
vec3 emissive = xeo_uEmissive; | |
float opacity = xeo_uOpacity; | |
float shininess = xeo_uShininess; | |
float reflectivity = xeo_uReflectivity; | |
vec3 viewNormalVec = normalize(xeo_vViewNormal); | |
vec3 diffuseLight = vec3(0.0, 0.0, 0.0); | |
vec3 specularLight = vec3(0.0, 0.0, 0.0); | |
vec3 viewLightVec; | |
float dotN; | |
float lightDist; | |
float attenuation; | |
viewLightVec = normalize(xeo_vViewLightVecAndDist1.xyz); | |
dotN = max(dot(viewNormalVec, viewLightVec), 0.0); | |
diffuseLight += dotN * xeo_uLightColor1; | |
specularLight += specular * xeo_uLightIntensity1 * pow(max(dot(reflect(-viewLightVec, -viewNormalVec), normalize(-xeo_vViewPosition.xyz)), 0.0), shininess); | |
viewLightVec = normalize(xeo_vViewLightVecAndDist2.xyz); | |
dotN = max(dot(viewNormalVec, viewLightVec), 0.0); | |
diffuseLight += dotN * xeo_uLightColor2; | |
specularLight += specular * xeo_uLightIntensity2 * pow(max(dot(reflect(-viewLightVec, -viewNormalVec), normalize(-xeo_vViewPosition.xyz)), 0.0), shininess); | |
gl_FragColor = vec4( (specularLight * specular) + (diffuse * (diffuseLight + ambient * xeo_uLightAmbientIntensity)) + emissive, opacity); | |
}XEO.Component.Class.extend.error @ xeoengine.js:990XEO.GameObject.XEO.Component.extend._compile @ xeoengine.js:14631XEO.Scene.XEO.Component.extend._compile @ xeoengine.js:2420frame @ xeoengine.js:92 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment