1 #ifndef R2_LIGHT_PROJECTIVE_H 2 #define R2_LIGHT_PROJECTIVE_H 46 const mat4x4 m_eye_to_light_eye,
47 const mat4x4 m_light_projection)
55 m_eye_to_light_eye * surface_hom;
59 surface_light_clip.xyz / surface_light_clip.w;
61 (surface_light_ndc.xy + 1.0) * 0.5;
65 (surface_light_clip.w < 0.0) ? 0.0 : 1.0;
77 #endif // R2_LIGHT_PROJECTIVE_H vec4 surface_light_eye
The surface position in light-eye-space.
vec4 surface_light_clip
The surface position in light-clip-space.
Vectors used when calculating projective lighting.
Vectors used when calculating positional lighting.
vec3 surface_light_ndc
The surface position as NDC coordinates from the perspective of the light.
R2_light_projective_vectors_t R2_lightProjectiveVectors(const R2_light_positional_t light, const vec3 p, const vec3 n, const mat4x4 m_eye_to_light_eye, const mat4x4 m_light_projection)
vec2 surface_light_uv
The surface position as UV coordinates from the perspective of the light.
R2_light_positional_vectors_t R2_lightPositionalVectors(const R2_light_positional_t light, const vec3 p, const vec3 n)
Functions and types related to positional lighting.
R2_light_positional_vectors_t positional
The vectors for positional lighting.
float back_projected
A value that indicates whether or not the light fragment is back projected (0.0 means back projected...