R2 Shaders
R2StencilSingle.vert
Go to the documentation of this file.
1 /// \file R2StencilSingle.vert
2 /// \brief Single-instance stencil vertex shader.
3 
4 layout(location = 0) in vec3 R2_vertex_position; // Object-space position
5 
6 /// Parameters for stencil instances
7 
9  /// Object-space to Eye-space matrix
11  /// Eye-space to Clip-space matrix
13 };
14 
15 uniform R2_stencil_parameters_t R2_stencil_parameters;
16 
17 void
18 main (void)
19 {
20  vec4 position_hom =
21  vec4 (R2_vertex_position, 1.0);
22  vec4 position_eye =
23  (R2_stencil_parameters.transform_modelview * position_hom);
24  vec4 position_clip =
25  ((R2_stencil_parameters.transform_projection * R2_stencil_parameters.transform_modelview) * position_hom);
26 
27  gl_Position = position_clip;
28 }
mat4x4 transform_modelview
Object-space to Eye-space matrix.
mat4x4 transform_projection
Eye-space to Clip-space matrix.
layout(location=0) out vec4 R2_out
RGBA color.
Parameters for stencil instances.