R2 Shaders
src
main
glsl
com
io7m
r2
shaders
sources
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
12
R2_light_output_t
13
R2_deferredLightMain
(
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
R2_reconstructed_surface_t::uv
vec2 uv
The UV coordinates of the current screen fragment.
Definition:
R2ReconstructedSurface.h:32
R2LightAmbient.h
Functions and types related to ambient lighting.
R2_reconstructed_surface_t
Reconstructed surface data, taken from the G-Buffer.
Definition:
R2ReconstructedSurface.h:16
R2LightShaderMain.h
The main function that all deferred light shaders must implement.
R2_light_ambient_t
A ambient light type.
Definition:
R2LightAmbient.h:9
R2_light_output_t
The type of light values that all deferred light shaders calculate.
Definition:
R2LightOutput.h:9
R2_lightAmbientTerm
vec3 R2_lightAmbientTerm(const R2_light_ambient_t light, const vec2 uv)
Definition:
R2LightAmbient.h:29
R2_deferredLightMain
R2_light_output_t R2_deferredLightMain(const R2_reconstructed_surface_t surface)
Definition:
R2LightAmbientWithOcclusion.h:13
Generated by
1.8.12