R2 Shaders
Functions | Variables
R2LightAmbientWithOcclusion.h File Reference

A trivial ambient light with mapped occlusion. More...

#include "R2LightShaderMain.h"
#include "R2LightAmbient.h"
Include dependency graph for R2LightAmbientWithOcclusion.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

R2_light_output_t R2_deferredLightMain (const R2_reconstructed_surface_t surface)
 

Variables

uniform R2_light_ambient_t R2_light_ambient
 

Detailed Description

A trivial ambient light with mapped occlusion.

Definition in file R2LightAmbientWithOcclusion.h.

Function Documentation

§ R2_deferredLightMain()

R2_light_output_t R2_deferredLightMain ( const R2_reconstructed_surface_t  surface)

Calculate light values for the current light, based on the current contents of the G-buffer.

Parameters
surfaceReconstructed surface data taken from the G-Buffer
Returns
Calculated light values

Definition at line 13 of file R2LightAmbientWithOcclusion.h.

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 }
vec2 uv
The UV coordinates of the current screen fragment.
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)