R2 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 
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
Types relating to the view.
Types for deferred surface shading.
Textures that are required by all surfaces.
Interpolated vertex data that all deferred surface shaders will receive.
The type of surface details that all deferred surface shaders are required to calculate.
Derived surface data that all deferred surface shaders will receive.
Matrices related to the rendered instance that all deferred surface shaders will receive.
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)
Matrices and parameters related to the view that all surface shaders will receive.
Definition: R2View.h:9