import {GodRaysMaterial} from 'postprocessing/src/materials/GodRaysMaterial.js'
GodRaysMaterial
Extends:
three~ShaderMaterial → GodRaysMaterial
A crepuscular rays shader material.
This material supports dithering.
References:
Thibaut Despoulain, 2012: (WebGL) Volumetric Light Approximation in Three.js
Nvidia, GPU Gems 3, 2008: Chapter 13. Volumetric Light Scattering as a Post-Process
Constructor Summary
Public Constructor | ||
public |
constructor(lightPosition: Vector2, options: Object) Constructs a new god rays material. |
Member Summary
Public Members | ||
public |
|
|
public get |
The amount of samples per pixel. |
|
public set |
Sets the amount of samples per pixel. |
Public Constructors
public constructor(lightPosition: Vector2, options: Object) source
Constructs a new god rays material.
Params:
Name | Type | Attribute | Description |
lightPosition | Vector2 |
|
The light position in screen space. |
options | Object |
|
The options. |
options.density | Number |
|
The density of the light rays. |
options.decay | Number |
|
An illumination decay factor. |
options.weight | Number |
|
A light ray weight factor. |
options.exposure | Number |
|
A constant attenuation coefficient. |
options.clampMax | Number |
|
An upper bound for the saturation of the overall effect. |