playcanvas
Version:
Open-source WebGL/WebGPU 3D engine for the web
3 lines (2 loc) • 474 B
TypeScript
declare const _default: "\n\nfn evaluateFogFactorLinear(depth: f32, fogStart: f32, fogEnd: f32) -> f32 {\n return clamp((fogEnd - depth) / (fogEnd - fogStart), 0.0, 1.0);\n}\n\nfn evaluateFogFactorExp(depth: f32, fogDensity: f32) -> f32 {\n return clamp(exp(-depth * fogDensity), 0.0, 1.0);\n}\n\nfn evaluateFogFactorExp2(depth: f32, fogDensity: f32) -> f32 {\n return clamp(exp(-depth * depth * fogDensity * fogDensity), 0.0, 1.0);\n}\n";
export default _default;