Variable: GodRaysShader
const GodRaysShader: object;Screen-space God Rays (Crytek radial blur method).
Seeds rays exclusively from a dedicated mask texture (tMask) that contains ONLY the star — rendered via a layer isolation pass. This prevents bright non-stellar pixels (gas planets, surface highlights, lens flare glows) near the sun UV from polluting the ray accumulation.
Variable ray lengths: angular noise (overlapping sine harmonics) modulates the weight per direction — some angles produce long bright rays, others nearly nothing, giving an organic star-burst pattern.
Pass order: RenderPass → GodRaysShaderPass → UnrealBloomPass → OutputPass Rays are bloomed by UnrealBloomPass, giving them a soft organic glow.
Type Declaration
name
name: string = 'GodRaysShader';uniforms
uniforms: object;uniforms.tDiffuse
tDiffuse: object;uniforms.tDiffuse.value
value: Texture<unknown, TextureEventMap> | null;uniforms.tMask
tMask: object;Star-only render (black everywhere else). Seeds all ray contributions.
uniforms.tMask.value
value: Texture<unknown, TextureEventMap> | null;uniforms.uSunUV
uSunUV: object;Sun position in UV space [0,1]. Updated every frame from camera projection.
uniforms.uSunUV.value
value: Vector2;uniforms.uExposure
uExposure: object;Overall brightness of rays
uniforms.uExposure.value
value: number = 0.7;uniforms.uDecay
uDecay: object;Attenuation per sample step (closer to 1 = longer rays)
uniforms.uDecay.value
value: number = 0.5;uniforms.uDensity
uDensity: object;Step stretch factor
uniforms.uDensity.value
value: number = 0.7;uniforms.uWeight
uWeight: object;Per-sample weight before angular modulation
uniforms.uWeight.value
value: number = 0.4;uniforms.uEnabled
uEnabled: object;0–1 fade: 0 when sun is off-screen or behind camera
uniforms.uEnabled.value
value: number = 1.0;vertexShader
vertexShader: string;fragmentShader
fragmentShader: string;