Sha256: af14331b65eff9d89cfd9150a34f91cfed235b0387fd256bc771eddb06211111
Contents?: true
Size: 656 Bytes
Versions: 9
Compression:
Stored size: 656 Bytes
Contents
varying vec3 v_positionEC; varying vec3 v_normalEC; void main() { vec3 positionToEyeEC = -v_positionEC; vec3 normalEC; #ifdef FACE_FORWARD normalEC = normalize(faceforward(v_normalEC, vec3(0.0, 0.0, 1.0), -v_normalEC)); #else normalEC = normalize(v_normalEC); #endif czm_materialInput materialInput; materialInput.normalEC = normalEC; materialInput.positionToEyeEC = positionToEyeEC; czm_material material = czm_getMaterial(materialInput); #ifdef FLAT gl_FragColor = vec4(material.diffuse + material.emission, material.alpha); #else gl_FragColor = czm_phong(normalize(positionToEyeEC), material); #endif }
Version data entries
9 entries across 9 versions & 1 rubygems