R2 Shaders
src
main
glsl
com
io7m
r2
shaders
sources
R2DepthShaderMain.h
Go to the documentation of this file.
1
#ifndef R2_DEPTH_SHADER_MAIN_H
2
#define R2_DEPTH_SHADER_MAIN_H
3
4
/// \file R2DepthShaderMain.h
5
/// \brief The main function that all depth 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 and
13
/// then return `true` if the surface fragment should not be discarded.
14
///
15
/// @param data Surface data (typically coming from a vertex)
16
/// @param derived Surface data calculated from the original vertex
17
/// @param view Matrices and parameters related to the current view
18
/// @param matrices_instance Matrices related to the instance to which this surface belongs
19
///
20
/// @return `true` iff the depth value should not be discarded
21
22
bool
23
R2_depthShaderMain
(
24
const
R2_vertex_data_t
data,
25
const
R2_view_t
view,
26
const
R2_surface_matrices_instance_t
matrices_instance
27
);
28
29
#endif // R2_DEPTH_SHADER_MAIN_H
R2_depthShaderMain
bool R2_depthShaderMain(const R2_vertex_data_t data, const R2_view_t view, const R2_surface_matrices_instance_t matrices_instance)
Definition:
R2DepthBasic.h:13
R2View.h
Types relating to the view.
R2SurfaceTypes.h
Types for deferred surface shading.
R2_vertex_data_t
Interpolated vertex data that all deferred surface shaders will receive.
Definition:
R2SurfaceTypes.h:11
R2_surface_matrices_instance_t
Matrices related to the rendered instance that all deferred surface shaders will receive.
Definition:
R2SurfaceTypes.h:44
R2_view_t
Matrices and parameters related to the view that all surface shaders will receive.
Definition:
R2View.h:9
Generated by
1.8.12