R2 Shaders
R2SurfaceTypes.h
Go to the documentation of this file.
1 #ifndef R2_SURFACE_TYPES_H
2 #define R2_SURFACE_TYPES_H
3 
4 /// \file R2SurfaceTypes.h
5 /// \brief Types for deferred surface shading
6 
7 #include "R2SurfaceOutput.h"
8 
9 /// Interpolated vertex data that all deferred surface shaders will receive.
10 
12  /// Eye-space surface position
14  /// Clip-space surface position
16  /// Positive eye-space Z position
18  /// Object-space UV
19  vec2 uv;
20  /// Object-space vertex normal
22  /// Tangent vector
23  vec3 tangent;
24  /// Bitangent vector
25  vec3 bitangent;
26 };
27 
28 /// Derived surface data that all deferred surface shaders will receive.
29 
31  /// Final uncompressed eye-space normal produced by bump/normal mapping
33 };
34 
35 /// Textures that are required by all surfaces
36 
38  /// RGB normal map texture
39  sampler2D normal;
40 };
41 
42 /// Matrices related to the rendered instance that all deferred surface shaders will receive.
43 
45  /// Object-space to Eye-space matrix
47  /// Object-space to Eye-space normal matrix
49  /// UV matrix
50  mat3x3 transform_uv;
51 };
52 
53 #endif // R2_SURFACE_TYPES_H
vec2 uv
Object-space UV.
mat3x3 transform_normal
Object-space to Eye-space normal matrix.
vec3 normal_vertex
Object-space vertex normal.
vec3 normal_bumped
Final uncompressed eye-space normal produced by bump/normal mapping.
vec4 position_clip
Clip-space surface position.
float positive_eye_z
Positive eye-space Z position.
vec3 tangent
Tangent vector.
vec4 position_eye
Eye-space surface position.
Types describing calculated surfaces.
mat4x4 transform_modelview
Object-space to Eye-space matrix.
mat3x3 transform_uv
UV matrix.
Textures that are required by all surfaces.
Interpolated vertex data that all deferred surface shaders will receive.
vec3 bitangent
Bitangent vector.
sampler2D normal
RGB normal map texture.
Derived surface data that all deferred surface shaders will receive.
Matrices related to the rendered instance that all deferred surface shaders will receive.