Research
Security News
Threat Actor Exposes Playbook for Exploiting npm to Build Blockchain-Powered Botnets
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.
glsl-specular-blinn-phong
Advanced tools
Computes the Blinn-Phong specular weight for a light source
#pragma glslify: blinnPhongSpec = require(glsl-specular-blinn-phong)
uniform vec3 eyePosition;
uniform vec3 lightPosition;
uniform float shininess;
varying vec3 surfacePosition;
varying vec3 surfaceNormal;
void main() {
vec3 eyeDirection = normalize(eyePosition - surfacePosition);
vec3 lightDirection = normalize(lightPosition - surfacePosition);
vec3 normal = normalize(surfaceNormal);
float power = blinnPhongSpec(lightDirection, eyeDirection, normal, shininess);
gl_FragColor = vec4(power,power,power,1.0);
}
Install with npm:
npm install glsl-specular-blinn-phong
Then use with glslify.
#pragma glslify: blinnPhong = require(glsl-specular-blinn-phong)
float blinnPhong(vec3 lightDir, vec3 eyeDir, vec3 normal, float shininess)
Computes the specular power in the Blinn-Phong lighting model.
lightDir
is a unit length vec3
pointing from the surface point toward the lighteyeDir
is a unit length vec3
pointing from the surface point toward the cameranormal
is the surface normal at the sample pointshininess
is the exponent in the Phong equation (default 20.0
)Returns A float
representing the power of the Blinn-Phong lighting equation
(c) 2014 Mikola Lysenko. MIT License
FAQs
Blinn-Phong specular effect
The npm package glsl-specular-blinn-phong receives a total of 1 weekly downloads. As such, glsl-specular-blinn-phong popularity was classified as not popular.
We found that glsl-specular-blinn-phong demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 9 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.
Security News
NVD’s backlog surpasses 20,000 CVEs as analysis slows and NIST announces new system updates to address ongoing delays.
Security News
Research
A malicious npm package disguised as a WhatsApp client is exploiting authentication flows with a remote kill switch to exfiltrate data and destroy files.