1 #ifndef R2_SURFACE_SHADER_DRIVER_SINGLE_H 2 #define R2_SURFACE_SHADER_DRIVER_SINGLE_H 18 layout(location = 0) out vec4 R2_out_albedo;
19 layout(location = 1) out vec2 R2_out_normal;
20 layout(location = 2) out vec4 R2_out_specular;
23 R2_surface_shader_main_gbuffer()
26 R2_surface_textures.
normal,
46 R2_surface_matrices_instance
72 gl_FragDepth = o.
depth;
79 #endif // R2_SURFACE_SHADER_DRIVER_SINGLE_H float R2_logDepthEncodePartial(const float z, const float depth_coefficient)
mat3x3 transform_normal
Object-space to Eye-space normal matrix.
vec3 normal_vertex
Object-space vertex normal.
Functions for transforming normal vectors.
vec3 specular
8-bit unsigned normalized RGB specular color
Types relating to the view.
Types for deferred surface shading.
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)
vec3 albedo
8-bit unsigned normalized RGB color
float positive_eye_z
Positive eye-space Z position.
vec3 tangent
Tangent vector.
float emission
8-bit unsigned normalized emission level
vec3 specular
8-bit unsigned normalized RGB specular color
bool discarded
True if this particular surface fragment should be discarded
vec3 normal
Eye-space normal vector.
vec2 normal
Compressed 16-bit half-precision normals.
float depth
Logarithmic depth value.
Textures that are required by all surfaces.
Interpolated vertex data that all deferred surface shaders will receive.
float specular_exp
Specular exponent in the range [0, 256]
float emission
8-bit unsigned normalized emission level
vec3 bitangent
Bitangent vector.
sampler2D normal
RGB normal map texture.
bool discarded
True if this particular surface fragment should be discarded
The type of surface details that all deferred surface shaders are required to calculate.
Derived surface data that all deferred surface shaders will receive.
Logarithmic depth functions.
A type representing the values written to the G-Buffer.
float depth_coefficient
The scene's logarithmic depth coefficient.
layout(location=0) out vec4 R2_out
RGBA color.
Matrices related to the rendered instance that all deferred surface shaders will receive.
vec3 albedo
8-bit unsigned normalized RGB color
Matrices and parameters related to the view that all surface shaders will receive.
vec2 R2_normalsCompress(const vec3 n)
float specular_exp
8-bit unsigned normalized specular exponent
vec3 R2_normalsBump(const sampler2D t_normal, const mat3x3 m_normal, const vec3 n, const vec3 t, const vec3 b, const vec2 uv)