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

Forward lights general shader. More...

Classes

struct  GPUPackedLight
 Represent a light in the forward renderer. More...
 
struct  GPUPackedProbe
 Represent an environment probe. More...
 

Public Member Functions

Probe unpackProbe (GPUPackedProbe srcProbe)
 
Light unpackLight (GPUPackedLight srcLight)
 
bool applyLight (GPUPackedLight gpuLight, vec3 viewSpacePos, vec3 viewSpaceN, textureCubeArray smapCube, texture2DArray smap2D, out vec3 l, out float shadowing)
 

Detailed Description

Forward lights general shader.

See also
GPUShaders::Common::Constants, GPUShaders::Common::Shadow_maps, GPUShaders::Common::Common_pbr

Member Function Documentation

◆ 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
gpuLightthe light packed information
viewSpacePosthe point position in view space
viewSpaceNthe surface normal in view space
smapCubethe cube shadow maps
smap2Dthe 2D shadow maps
lwill contain the light direction for the point
shadowingwill contain the shadowing factor
Returns
true if the light contributes to the point shading

◆ unpackLight()

Light GPUShaders::Common::Forward_lights::unpackLight ( GPUPackedLight  srcLight)
inline

Convert a forward renderer packed light to the generic shader representation.

Parameters
srcLightthe packed light
Returns
the populated light

◆ unpackProbe()

Probe GPUShaders::Common::Forward_lights::unpackProbe ( GPUPackedProbe  srcProbe)
inline

Convert a forward renderer packed probe to the generic shader representation.

Parameters
srcProbethe packed probe
Returns
the populated probe

The documentation for this class was generated from the following file: