export default /* glsl */ ` #ifdef SOFT_PARTICLES uniform sampler2D depthTexture; uniform vec4 projParams; uniform vec2 softParams; varying vec4 projPosition; varying float linearDepth; #define SOFT_NEAR_FADE softParams.x #define SOFT_INV_FADE_DISTANCE softParams.y #define zNear projParams.x #define zFar projParams.y float linearize_depth(float d) { return (zFar * zNear) / (zFar - d * (zFar - zNear)); } #endif `;