| Support Forum G3D Web Page |
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... | |
Shader program.
|
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
| glossyN | A separate normal to use with glossy [surface, vs. subsurface] reflection terms (simulates a clear coat with a different orientation) |
|
inline |
Uses all of the light global variables.
| uniform vec4 glsl::LightingEnvironment_LightUniforms_glsl::light | ( | I | ) |
World space light position.
| uniform vec3 glsl::LightingEnvironment_LightUniforms_glsl::light | ( | I | ) |
Power of the light's bulb.
| uniform vec3 glsl::LightingEnvironment_LightUniforms_glsl::light | ( | I | ) |
Spot light facing direction (unit length)
| uniform vec4 glsl::LightingEnvironment_LightUniforms_glsl::light | ( | I | ) |
w element is the spotlight cutoff angle.
| uniform float glsl::LightingEnvironment_LightUniforms_glsl::light | ( | I | ) |
| uniform bool glsl::LightingEnvironment_LightUniforms_glsl::light | ( | I | ) |
Is this spotlight's field of view rectangular (instead of round)?
| uniform vec3 glsl::LightingEnvironment_LightUniforms_glsl::light | ( | I | ) |
| uniform vec3 glsl::LightingEnvironment_LightUniforms_glsl::light | ( | I | ) |
| uniform float glsl::LightingEnvironment_LightUniforms_glsl::light | ( | I | ) |
Radius of the light bulb itself; no relation to the light's effect sphere.
| 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.
1.8.15