Socket
Socket
Sign inDemoInstall

glsl-specular-cook-torrance

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

glsl-specular-cook-torrance - npm Package Compare versions

Comparing version 1.0.1 to 2.0.0

4

example/example.js

@@ -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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc