glsl-specular-cook-torrance
Advanced tools
Comparing version 1.0.1 to 2.0.0
@@ -33,3 +33,3 @@ 'use strict' | ||
} else {\n\ | ||
float power = specular(lightDir, eyeDir, normal, 0.9, 0.5);\n\ | ||
float power = 10.0 * specular(lightDir, eyeDir, normal, 0.2, 1.0);\n\ | ||
gl_FragColor = vec4(power,power,power, 1.0);\n\ | ||
@@ -57,3 +57,3 @@ }\n\ | ||
var y = Math.sin(theta) | ||
shader.uniforms.lightPosition = [30.0*x, 10.0, 30.0*y] | ||
shader.uniforms.lightPosition = [100.0*x, 10.0, 100.0*y] | ||
drawTriangle(gl) | ||
@@ -60,0 +60,0 @@ requestAnimationFrame(render) |
{ | ||
"name": "glsl-specular-cook-torrance", | ||
"version": "1.0.1", | ||
"version": "2.0.0", | ||
"description": "Cook-Torrance specular/fresnel lighting term", | ||
@@ -40,4 +40,4 @@ "main": "index.js", | ||
"dependencies": { | ||
"glsl-specular-beckmann": "^1.0.0" | ||
"glsl-specular-beckmann": "^1.1.0" | ||
} | ||
} |
@@ -64,3 +64,5 @@ # glsl-specular-cook-torrance | ||
**Note** Unlike the usual Cook-Torrance model, the light power is not scaled by 1/(normal . lightDirection). This avoids an unnecessary numerically unstable division, but requires modifying how diffuse light is calculated. | ||
# License | ||
(c) 2014 Mikola Lysenko. MIT License |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
6611
67