Support Forum       G3D Web Page     
Public Member Functions | Public Attributes | List of all members
glsl::LightingEnvironment_LightUniforms_glsl Class Reference

Shader program. More...

Public Member Functions

void computeDirectLighting (Vector3 n, Vector3 glossyN, Vector3 w_o, Vector3 n_face, float backside, Point3 wsPosition, float glossyExponent, inout Color3 E_lambertian, inout Color3 E_glossy, sampler2D dummyLightSampler2D)
 
Uses global variables: More...
 
Radiance3 computeDirectLighting (UniversalMaterialSample surfel, Vector3 w_o, float backside)
 Uses all of the light global variables. More...
 
uniform vec4 light (I) _position
 World space light position. More...
 
uniform vec3 light (I) _color
 Power of the light's bulb. More...
 
uniform vec3 light (I) _direction
 Spot light facing direction (unit length) More...
 
uniform vec4 light (I) _attenuation
 w element is the spotlight cutoff angle. More...
 
uniform float light (I) _softnessConstant
 
uniform bool light (I) _rectangular
 Is this spotlight's field of view rectangular (instead of round)? More...
 
uniform vec3 light (I) _up
 
uniform vec3 light (I) _right
 
uniform float light (I) _radius
 Radius of the light bulb itself; no relation to the light's effect sphere. More...
 

Public Attributes

uniform sampler2DShadow dummyLightSampler2DShadow
 Used by computeDirectLighting for lights that do not have shadow maps on them. More...
 

Detailed Description

Shader program.

Member Function Documentation

◆ computeDirectLighting() [1/2]

void glsl::LightingEnvironment_LightUniforms_glsl::computeDirectLighting ( Vector3  n,
Vector3  glossyN,
Vector3  w_o,
Vector3  n_face,
float  backside,
Point3  wsPosition,
float  glossyExponent,
inout Color3  E_lambertian,
inout Color3  E_glossy,
sampler2D  dummyLightSampler2D 
)
inline


Uses global variables:

light_position light_attenuation light_softnessConstant light_direction light_up light_right light_rectangular light_radius light_color light_shadowMap_variance_notNull light_shadowMap_variance_buffer light_shadowMap_notNull light_shadowMap_invSize light_shadowMap_buffer

Parameters
glossyNA separate normal to use with glossy [surface, vs. subsurface] reflection terms (simulates a clear coat with a different orientation)

◆ computeDirectLighting() [2/2]

Radiance3 glsl::LightingEnvironment_LightUniforms_glsl::computeDirectLighting ( UniversalMaterialSample  surfel,
Vector3  w_o,
float  backside 
)
inline

Uses all of the light global variables.

◆ light() [1/9]

uniform vec4 glsl::LightingEnvironment_LightUniforms_glsl::light ( )

World space light position.

◆ light() [2/9]

uniform vec3 glsl::LightingEnvironment_LightUniforms_glsl::light ( )

Power of the light's bulb.

◆ light() [3/9]

uniform vec3 glsl::LightingEnvironment_LightUniforms_glsl::light ( )

Spot light facing direction (unit length)

◆ light() [4/9]

uniform vec4 glsl::LightingEnvironment_LightUniforms_glsl::light ( )

w element is the spotlight cutoff angle.

◆ light() [5/9]

uniform float glsl::LightingEnvironment_LightUniforms_glsl::light ( )

◆ light() [6/9]

uniform bool glsl::LightingEnvironment_LightUniforms_glsl::light ( )

Is this spotlight's field of view rectangular (instead of round)?

◆ light() [7/9]

uniform vec3 glsl::LightingEnvironment_LightUniforms_glsl::light ( )

◆ light() [8/9]

uniform vec3 glsl::LightingEnvironment_LightUniforms_glsl::light ( )

◆ light() [9/9]

uniform float glsl::LightingEnvironment_LightUniforms_glsl::light ( )

Radius of the light bulb itself; no relation to the light's effect sphere.

Member Data Documentation

◆ dummyLightSampler2DShadow

uniform sampler2DShadow glsl::LightingEnvironment_LightUniforms_glsl::dummyLightSampler2DShadow

Used by computeDirectLighting for lights that do not have shadow maps on them.

We don't pass dummy shadow maps per-Light because OpenGL has a small, limited number of samplers (when not using bindless texture), and that would cause scenes with many lights to exhaust the available samplers unnecessarily.


documentation generated on Wed Nov 24 2021 08:02:04 using doxygen 1.8.15