docs/pages/GodraysNode.html
GodraysNode is an addon, and must be imported explicitly, see Installation#Addons.
import { godrays } from 'three/addons/tsl/display/GodraysNode.js';
Constructs a new Godrays node.
| depthNode |
A texture node that represents the scene's depth.
| | camera |
The camera the scene is rendered with.
| | light |
The light the godrays are rendered for.
|
The rate of accumulation for the godrays. Higher values roughly equate to more humid air/denser fog.
Default is 0.7.
A node that represents the beauty pass's depth.
Higher values decrease the accumulation of godrays the further away they are from the light source.
Default is 2.
The maximum density of the godrays. Limits the maximum brightness of the godrays.
Default is 0.5.
The number of raymarching steps
Default is 60.
The resolution scale.
The updateBeforeType is set to NodeUpdateType.FRAME since the node renders its effect once per frame in updateBefore().
Default is 'frame'.
Overrides: TempNode#updateBeforeType
Frees internal resources. This method should be called when the effect is no longer required.
Overrides: TempNode#dispose
Returns the result of the effect as a texture node.
Returns: A texture node that represents the result of the effect.
Sets the size of the effect.
| width |
The width of the effect.
| | height |
The height of the effect.
|
This method is used to setup the effect's TSL code.
| builder |
The current node builder.
|
Overrides: TempNode#setup
This method is used to render the effect once per frame.
| frame |
The current node frame.
|
Overrides: TempNode#updateBefore