Rendu
A lightweight rendering engine for experimentations
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
GPUShaders::Frag::Brdf_sampler Class Reference

Brdf sampler fragment shader. More...

Public Member Functions

vec3 ggx (float NdotV, float roughness)
 
void main ()
 

Public Attributes

in vec2 uv
 Texture coordinates.
 
out vec4 fragColor
 BRDF linear coefficients.
 

Detailed Description

Brdf sampler fragment shader.

See also
GPUShaders::Common::Common_pbr, GPUShaders::Common::Utils

Member Function Documentation

◆ 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
NdotVdot product of the view direction with the surface normal
roughnessthe 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: