Cubemap convo fragment shader.
More...
|
vec3 | convo (vec3 r, float roughness) |
|
void | main () |
|
|
in vec3 | pos |
| World position.
|
|
uniform uniform float | mipmapRoughness |
| The roughness to use for the convolution lobe.
|
|
uniform float | clampMax |
| Clamp input HDR values to avoid artefacts.
|
|
uniform int | samplesCount |
| Number of samples to take, higher count helps avoiding artifacts in bright areas.
|
|
out vec3 | fragColor |
| Color.
|
|
◆ convo()
vec3 GPUShaders::Frag::Cubemap_convo::convo |
( |
vec3 |
r, |
|
|
float |
roughness |
|
) |
| |
|
inline |
Perform convolution with the BRDF specular lobe, evaluated in a given direction.
- Parameters
-
r | the reflection direction |
roughness | the roughness to evalute the BRDF at |
- Returns
- the result of the convolution
◆ main()
void GPUShaders::Frag::Cubemap_convo::main |
( |
| ) |
|
|
inline |
Perform convolution of the cubemap with the BRDF lobe at a given roughness, using a high number of samples and importance sampling. This is done in the direction in world space of the current fragment.
The documentation for this class was generated from the following file:
- resources/pbrdemo/shaders/cubemap_convo.frag