Forward lights general shader.
More...
◆ applyLight()
bool GPUShaders::Common::Forward_lights::applyLight |
( |
GPUPackedLight |
gpuLight, |
|
|
vec3 |
viewSpacePos, |
|
|
vec3 |
viewSpaceN, |
|
|
textureCubeArray |
smapCube, |
|
|
texture2DArray |
smap2D, |
|
|
out vec3 |
l, |
|
|
out float |
shadowing |
|
) |
| |
|
inline |
Compute a light contribution for a given point in forward shading.
- Parameters
-
gpuLight | the light packed information |
viewSpacePos | the point position in view space |
viewSpaceN | the surface normal in view space |
smapCube | the cube shadow maps |
smap2D | the 2D shadow maps |
l | will contain the light direction for the point |
shadowing | will contain the shadowing factor |
- Returns
- true if the light contributes to the point shading
◆ unpackLight()
Convert a forward renderer packed light to the generic shader representation.
- Parameters
-
- Returns
- the populated light
◆ unpackProbe()
Convert a forward renderer packed probe to the generic shader representation.
- Parameters
-
- Returns
- the populated probe
The documentation for this class was generated from the following file:
- resources/pbrdemo/shaders/forward/forward_lights.glsl