1 #ifndef R2_LIGHT_SHADER_DRIVER_SINGLE_H 2 #define R2_LIGHT_SHADER_DRIVER_SINGLE_H 15 layout(location = 0) out vec4 R2_out_diffuse;
16 layout(location = 1) out vec4 R2_out_specular;
20 uniform
float R2_light_depth_coefficient;
23 in
float R2_light_volume_positive_eye_z;
35 R2_light_volume_positive_eye_z,
36 R2_light_depth_coefficient);
44 R2_light_depth_coefficient,
49 R2_out_diffuse = vec4 (o.
diffuse, 1.0);
50 R2_out_specular = vec4 (o.
specular, 1.0);
51 gl_FragDepth = depth_log;
54 #endif // R2_LIGHT_SHADER_DRIVER_SINGLE_H float R2_logDepthEncodePartial(const float z, const float depth_coefficient)
Functions for transforming normal vectors.
Viewport types and functions.
Reconstructed surface data, taken from the G-Buffer.
The type of view rays used to reconstruct positions during deferred rendering.
Logarithmic depth functions.
Types describing calculated light contributions.
layout(location=0) out vec4 R2_out
RGBA color.
The type of light values that all deferred light shaders calculate.
vec3 diffuse
The diffuse color/intensity (8-bit unsigned)
vec3 specular
The specular color/intensity (8-bit unsigned)
Surface data reconstructed from the G-Buffer.
R2_light_output_t R2_deferredLightMain(const R2_reconstructed_surface_t surface)
R2_reconstructed_surface_t R2_deferredSurfaceReconstruct(const R2_gbuffer_input_t gbuffer, const R2_viewport_t viewport, const R2_view_rays_t view_rays, const float depth_coefficient, const vec2 screen_position)