R2 Core Shaders

R2SurfaceBasicTypes.h
Go to the documentation of this file.
1 #ifndef R2_SURFACE_BASIC_TYPES_H
2 #define R2_SURFACE_BASIC_TYPES_H
3
4 /// \file R2SurfaceBasicTypes.h
5 /// \brief Types for basic surfaces
6
7 /// Constant surface parameters that all basic surface shaders will receive.
8
9 struct R2_basic_surface_parameters_t {
10 /// Emission level in the range `[0, 1]`
11 float emission_amount;
12
13 /// Base RGBA albedo color
14 vec4 albedo_color;
15 /// Albedo color/texture mix
16 float albedo_mix;
17
18 /// RGB specular color
19 vec3 specular_color;
20 /// Specular exponent in the range `[0, 256]`
21 float specular_exponent;
22
23 /// Alpha discard threshold in the range `[0, 1]`.
24 float alpha_discard_threshold;
25 };
26
27 /// Input textures that all basic surface shaders will receive.
28
29 struct R2_basic_surface_textures_t {
30 /// RGBA albedo texture
31 sampler2D albedo;
32 /// RGB specular map texture
33 sampler2D specular;
34 /// R emission level texture
35 sampler2D emission;
36 };
37
38 #endif // R2_SURFACE_BASIC_TYPES_H
R2_basic_surface_parameters_t::emission_amount
float emission_amount
Emission level in the range [0, 1]
Definition: R2SurfaceBasicTypes.h:11
R2_basic_surface_parameters_t::specular_color
vec3 specular_color
RGB specular color.
Definition: R2SurfaceBasicTypes.h:19
R2_basic_surface_textures_t::emission
sampler2D emission
R emission level texture.
Definition: R2SurfaceBasicTypes.h:35
R2_basic_surface_parameters_t
Constant surface parameters that all basic surface shaders will receive.
Definition: R2SurfaceBasicTypes.h:9
R2_basic_surface_textures_t
Input textures that all basic surface shaders will receive.
Definition: R2SurfaceBasicTypes.h:29
R2_basic_surface_parameters_t::albedo_color
vec4 albedo_color
Base RGBA albedo color.
Definition: R2SurfaceBasicTypes.h:14
R2_basic_surface_textures_t::albedo
sampler2D albedo
RGBA albedo texture.
Definition: R2SurfaceBasicTypes.h:31
R2_basic_surface_parameters_t::specular_exponent
float specular_exponent
Specular exponent in the range [0, 256]
Definition: R2SurfaceBasicTypes.h:21
R2_basic_surface_parameters_t::albedo_mix
float albedo_mix
Albedo color/texture mix.
Definition: R2SurfaceBasicTypes.h:16
R2_basic_surface_parameters_t::alpha_discard_threshold
float alpha_discard_threshold
Alpha discard threshold in the range [0, 1].
Definition: R2SurfaceBasicTypes.h:24
R2_basic_surface_textures_t::specular
sampler2D specular
RGB specular map texture.
Definition: R2SurfaceBasicTypes.h:33