UNPKG

playcanvas

Version:

Open-source WebGL/WebGPU 3D engine for the web

9 lines (7 loc) 210 B
var falloffLinearPS = ` float getFalloffLinear(float lightRadius, vec3 lightDir) { float d = length(lightDir); return max(((lightRadius - d) / lightRadius), 0.0); } `; export { falloffLinearPS as default };