Shadow maps general shader.
More...
|
float | shadowBasic (vec3 lightSpacePosition, texture2DArray smap, uint layer, float bias) |
|
float | shadowBasicCube (vec3 lightToPosDir, textureCubeArray smap, uint layer, float farPlane, float bias) |
|
float | shadowPCF (vec3 lightSpacePosition, texture2DArray smap, uint layer, float bias) |
|
vec3 | cubemapToFaceIdAndUV (vec3 dir, out vec3 uDir, out vec3 vDir) |
|
float | shadowPCFCube (vec3 lightToPosDir, textureCubeArray smap, uint layer, float farPlane, float bias) |
|
float | shadowVSM (vec3 lightSpacePosition, texture2DArray smap, uint layer) |
|
float | shadowVSMCube (vec3 lightToPosDir, textureCubeArray smap, uint layer, float farPlane) |
|
float | shadow (uint mode, vec3 lightSpacePosition, texture2DArray smap, uint layer, float bias) |
|
float | shadowCube (uint mode, vec3 lightToPosDir, textureCubeArray smap, uint layer, float farPlane, float bias) |
|
◆ cubemapToFaceIdAndUV()
vec3 GPUShaders::Common::Shadow_maps::cubemapToFaceIdAndUV |
( |
vec3 |
dir, |
|
|
out vec3 |
uDir, |
|
|
out vec3 |
vDir |
|
) |
| |
|
inline |
Convert a unit direction to a cubemap face and local UVs
- Parameters
-
dir | the direction to sample |
uDir | will contain the axis corresponding to the U coordinate |
vDir | will contain the axis corresponding to the V coordinate |
- Returns
- the face index and the UV coordinates
◆ shadow()
float GPUShaders::Common::Shadow_maps::shadow |
( |
uint |
mode, |
|
|
vec3 |
lightSpacePosition, |
|
|
texture2DArray |
smap, |
|
|
uint |
layer, |
|
|
float |
bias |
|
) |
| |
|
inline |
Compute the lighting factor based on shadow map.
- Parameters
-
mode | the shadow mapping technique (basic or VSM) |
lightSpacePosition | fragment position in light space |
smap | the shadow map |
layer | the texture layer to read from |
bias | the bias to apply |
- Returns
- the lighting factor (0.0 = in shadow)
◆ shadowBasic()
float GPUShaders::Common::Shadow_maps::shadowBasic |
( |
vec3 |
lightSpacePosition, |
|
|
texture2DArray |
smap, |
|
|
uint |
layer, |
|
|
float |
bias |
|
) |
| |
|
inline |
Compute the lighting factor based on shadow map.
- Parameters
-
lightSpacePosition | fragment position in light space |
smap | the shadow map |
layer | the texture layer to read from |
bias | the bias to apply |
- Returns
- the lighting factor (0.0 = in shadow)
◆ shadowBasicCube()
float GPUShaders::Common::Shadow_maps::shadowBasicCube |
( |
vec3 |
lightToPosDir, |
|
|
textureCubeArray |
smap, |
|
|
uint |
layer, |
|
|
float |
farPlane, |
|
|
float |
bias |
|
) |
| |
|
inline |
Compute the lighting factor based on shadow map.
- Parameters
-
lightToPosDir | direction from the light to the fragment position, in world space. |
smap | the shadow cube map |
layer | the texture layer to read from |
farPlane | distance to the light projection far plane |
bias | the bias to apply |
- Returns
- the lighting factor (0.0 = in shadow)
◆ shadowCube()
float GPUShaders::Common::Shadow_maps::shadowCube |
( |
uint |
mode, |
|
|
vec3 |
lightToPosDir, |
|
|
textureCubeArray |
smap, |
|
|
uint |
layer, |
|
|
float |
farPlane, |
|
|
float |
bias |
|
) |
| |
|
inline |
Compute the lighting factor based on shadow map.
- Parameters
-
mode | the shadow mapping technique (basic or VSM) |
lightToPosDir | direction from the light to the fragment position, in world space. |
smap | the shadow cube map |
layer | the texture layer to read from |
farPlane | distance to the light projection far plane |
bias | the bias to apply |
- Returns
- the lighting factor (0.0 = in shadow)
◆ shadowPCF()
float GPUShaders::Common::Shadow_maps::shadowPCF |
( |
vec3 |
lightSpacePosition, |
|
|
texture2DArray |
smap, |
|
|
uint |
layer, |
|
|
float |
bias |
|
) |
| |
|
inline |
Compute the lighting factor based on shadow map.
- Parameters
-
lightSpacePosition | fragment position in light space |
smap | the shadow map |
layer | the texture layer to read from |
bias | the bias to apply |
- Returns
- the lighting factor (0.0 = in shadow)
◆ shadowPCFCube()
float GPUShaders::Common::Shadow_maps::shadowPCFCube |
( |
vec3 |
lightToPosDir, |
|
|
textureCubeArray |
smap, |
|
|
uint |
layer, |
|
|
float |
farPlane, |
|
|
float |
bias |
|
) |
| |
|
inline |
Compute the lighting factor based on shadow map.
- Parameters
-
lightToPosDir | direction from the light to the fragment position, in world space. |
smap | the shadow cube map |
layer | the texture layer to read from |
farPlane | distance to the light projection far plane |
bias | the bias to apply |
- Returns
- the lighting factor (0.0 = in shadow)
◆ shadowVSM()
float GPUShaders::Common::Shadow_maps::shadowVSM |
( |
vec3 |
lightSpacePosition, |
|
|
texture2DArray |
smap, |
|
|
uint |
layer |
|
) |
| |
|
inline |
Compute the lighting factor based on shadow map, using variance shadow mapping.
- Parameters
-
lightSpacePosition | fragment position in light space |
smap | the shadow map |
layer | the texture layer to read from |
- Returns
- the lighting factor (0.0 = in shadow)
◆ shadowVSMCube()
float GPUShaders::Common::Shadow_maps::shadowVSMCube |
( |
vec3 |
lightToPosDir, |
|
|
textureCubeArray |
smap, |
|
|
uint |
layer, |
|
|
float |
farPlane |
|
) |
| |
|
inline |
Compute the lighting factor based on shadow map, using variance shadow mapping.
- Parameters
-
lightToPosDir | direction from the light to the fragment position, in world space. |
smap | the shadow cube map |
layer | the texture layer to read from |
farPlane | distance to the light projection far plane |
- Returns
- the lighting factor (0.0 = in shadow)
The documentation for this class was generated from the following file:
- resources/common/shaders/lights/shadow_maps.glsl