UNPKG

playcanvas

Version:

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

13 lines (12 loc) 256 B
var falloffLinear_default = ( /* wgsl */ ` fn getFalloffLinear(lightRadius: f32, lightDir: vec3f) -> f32 { let d: f32 = length(lightDir); return max(((lightRadius - d) / lightRadius), 0.0); } ` ); export { falloffLinear_default as default };