1 #ifndef R2_SURFACE_BASIC_H 2 #define R2_SURFACE_BASIC_H 22 texture (R2_basic_surface_textures.
albedo, data.
uv);
26 R2_basic_surface_parameters.
albedo_mix * albedo_sample.w);
28 float emission_sample =
29 texture (R2_basic_surface_textures.
emission, data.
uv).x;
33 vec3 specular_sample =
34 texture (R2_basic_surface_textures.
specular, data.
uv).xyz;
51 #endif // R2_SURFACE_BASIC_H The main function that all deferred surface shaders must implement.
float emission_amount
Emission level in the range [0, 1]
vec3 normal_bumped
Final uncompressed eye-space normal produced by bump/normal mapping.
vec3 specular_color
RGB specular color.
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)
sampler2D emission
R emission level texture.
Constant surface parameters that all basic surface shaders will receive.
Input textures that all basic surface shaders will receive.
vec4 albedo_color
Base RGBA albedo color.
Textures that are required by all surfaces.
Interpolated vertex data that all deferred surface shaders will receive.
sampler2D albedo
RGBA albedo texture.
float specular_exponent
Specular exponent in the range [0, 256]
The type of surface details that all deferred surface shaders are required to calculate.
Derived surface data that all deferred surface shaders will receive.
float albedo_mix
Albedo color/texture mix.
float alpha_discard_threshold
Alpha discard threshold in the range [0, 1].
Types for basic surfaces.
Matrices related to the rendered instance that all deferred surface shaders will receive.
sampler2D specular
RGB specular map texture.
Matrices and parameters related to the view that all surface shaders will receive.