Brdf sampler fragment shader.
More...
|
vec3 | ggx (float NdotV, float roughness) |
|
void | main () |
|
|
in vec2 | uv |
| Texture coordinates.
|
|
out vec4 | fragColor |
| BRDF linear coefficients.
|
|
◆ ggx()
vec3 GPUShaders::Frag::Brdf_sampler::ggx |
( |
float |
NdotV, |
|
|
float |
roughness |
|
) |
| |
|
inline |
Evaluated the GGX BRDF for a given surface normal, view direction and roughness.
- Parameters
-
NdotV | dot product of the view direction with the surface normal |
roughness | the roughness of the surface |
- Returns
- the corresponding value of the BRDF
◆ main()
void GPUShaders::Frag::Brdf_sampler::main |
( |
| ) |
|
|
inline |
Compute a linear approximation of the GGX BRDF in two coefficients.
The documentation for this class was generated from the following file:
- resources/pbrdemo/shaders/brdf_sampler.frag