R2 Core Shaders

R2SurfaceShaderMain.h
Go to the documentation of this file.
1 #ifndef R2_SURFACE_SHADER_MAIN_H
2 #define R2_SURFACE_SHADER_MAIN_H
3
4 /// \file R2SurfaceShaderMain.h
5 /// \brief The main function that all deferred surface shaders must implement.
6
7 #include "R2SurfaceTypes.h"
8 #include "R2View.h"
9
10 ///
11 /// Calculate surface values for the current surface. Implementations of this
12 /// function are expected to calculate a description of the current surface.
13 /// The description is encoded into the G-buffer by the caller.
14 ///
15 /// @param data Surface data (typically coming from a vertex)
16 /// @param derived Surface data calculated from the original vertex
17 /// @param textures Textures that are required by all surfaces
18 /// @param view Matrices and parameters related to the current view
19 /// @param matrices_instance Matrices related to the instance to which this surface belongs
20 ///
21 /// @return Calculated surface values
22
23 R2_surface_output_t
24 R2_deferredSurfaceMain (
25 const R2_vertex_data_t data,
26 const R2_surface_derived_t derived,
27 const R2_surface_textures_t textures,
28 const R2_view_t view,
29 const R2_surface_matrices_instance_t matrices_instance
30 );
31
32 #endif // R2_SURFACE_SHADER_MAIN_H
R2View.h
Types relating to the view.
R2SurfaceTypes.h
Types for deferred surface shading.
R2_surface_textures_t
Textures that are required by all surfaces.
Definition: R2SurfaceTypes.h:37
R2_vertex_data_t
Interpolated vertex data that all deferred surface shaders will receive.
Definition: R2SurfaceTypes.h:11
R2_surface_output_t
The type of surface details that all deferred surface shaders are required to calculate.
Definition: R2SurfaceOutput.h:9
R2_surface_derived_t
Derived surface data that all deferred surface shaders will receive.
Definition: R2SurfaceTypes.h:30
R2_surface_matrices_instance_t
Matrices related to the rendered instance that all deferred surface shaders will receive.
Definition: R2SurfaceTypes.h:44
R2_deferredSurfaceMain
R2_surface_output_t R2_deferredSurfaceMain(const R2_vertex_data_t data, const R2_surface_derived_t derived, const R2_surface_textures_t textures, const R2_view_t view, const R2_surface_matrices_instance_t matrices_instance)
Definition: R2SurfaceBasic.h:14
R2_view_t
Matrices and parameters related to the view that all surface shaders will receive.
Definition: R2View.h:9