ScreenSpaceEffectSource Interface
The GLSL implementation of the effect produced by a ScreenSpaceEffectBuilder, to be integrated into a complete shader program. The effect shader code differs slightly from that of an ordinary shader:
- Instead of
main
, it should implementeffectMain
.- It can include other functions, variables, etc outside of
effectMain
.
- It can include other functions, variables, etc outside of
- It should omit declarations of uniform and varying variables - these will be generated from those supplied to addUniform and addVarying.
The program receives one pre-defined
uniform sampler2D u_diffuse
representing the viewport's rendered image.
Properties
Name | Type | Description | |
---|---|---|---|
fragment | string | The GLSL implementation of the fragment shader. | |
sampleSourcePixel | string | undefined | If the fragment shader shifts pixels from their original locations, then by default element locate will not work, because it expects the pixels produced by an element | |
vertex | string | The GLSL implementation of the vertex shader. |
Defined in
Last Updated: 14 November, 2024
Found something wrong, missing, or unclear on this page?Raise an issue in our repo.