R2 Shaders
R2LightAmbientWithOcclusion.h
Go to the documentation of this file.
1 #ifndef R2_LIGHT_AMBIENT_WITH_OCCLUSION_H
2 #define R2_LIGHT_AMBIENT_WITH_OCCLUSION_H
3 
4 /// \file R2LightAmbientWithOcclusion.h
5 /// \brief A trivial ambient light with mapped occlusion
6 
7 #include "R2LightShaderMain.h"
8 #include "R2LightAmbient.h"
9 
10 uniform R2_light_ambient_t R2_light_ambient;
11 
14  const R2_reconstructed_surface_t surface)
15 {
16  vec3 diffuse =
17  R2_lightAmbientTerm (R2_light_ambient, surface.uv);
18  vec3 specular =
19  vec3 (0.0);
20 
21  return R2_light_output_t (diffuse, specular);
22 }
23 
24 #endif // R2_LIGHT_AMBIENT_WITH_OCCLUSION_H
vec2 uv
The UV coordinates of the current screen fragment.
Functions and types related to ambient lighting.
Reconstructed surface data, taken from the G-Buffer.
The main function that all deferred light shaders must implement.
A ambient light type.
Definition: R2LightAmbient.h:9
The type of light values that all deferred light shaders calculate.
Definition: R2LightOutput.h:9
vec3 R2_lightAmbientTerm(const R2_light_ambient_t light, const vec2 uv)
R2_light_output_t R2_deferredLightMain(const R2_reconstructed_surface_t surface)