import msp_interface;
import shadow;
+uniform EnvMap
+{
+ mat3 env_eye_matrix;
+};
+
+uniform sampler2D normal_map;
+uniform samplerCube environment_map;
+
layout(constant_id=auto) const bool use_normal_map = false;
#pragma MSP stage(vertex)
import common;
import shadow;
+struct PbrMaterialParameters
+{
+ vec4 base_color;
+ vec4 emission;
+ float metalness;
+ float roughness;
+};
+
+uniform PbrMaterial
+{
+ PbrMaterialParameters pbr_material;
+};
+
+uniform sampler2D base_color_map;
+uniform sampler2D metalness_map;
+uniform sampler2D roughness_map;
+uniform sampler2D occlusion_map;
+uniform sampler2D emission_map;
+
layout(constant_id=auto) const bool use_base_color_map = false;
layout(constant_id=auto) const bool use_metalness_map = false;
layout(constant_id=auto) const bool use_roughness_map = false;
vec4 specular;
};
-struct BasicMaterialParameters
-{
- vec4 diffuse;
- vec4 specular;
- vec4 emission;
- float shininess;
- float reflectivity;
-};
-
-struct PbrMaterialParameters
-{
- vec4 base_color;
- vec4 emission;
- float metalness;
- float roughness;
-};
-
struct ClipPlane
{
vec4 equation;
mat4 projection_matrix;
};
-uniform BasicMaterial
-{
- BasicMaterialParameters basic_material;
-};
-
-uniform PbrMaterial
-{
- PbrMaterialParameters pbr_material;
-};
-
uniform Lighting
{
// Declared as an array for compatibility reasons
float fog_density;
};
-uniform sampler2D diffuse_map;
-uniform sampler2D specular_map;
-uniform sampler2D shininess_map;
-uniform sampler2D reflectivity_map;
-uniform sampler2D base_color_map;
-uniform sampler2D metalness_map;
-uniform sampler2D roughness_map;
-uniform sampler2D occlusion_map;
-uniform sampler2D emission_map;
-uniform sampler2D normal_map;
-
-uniform sampler2DShadow shadow_map;
-uniform ShadowMap
-{
- float shadow_darkness;
- mat4 shd_eye_matrix;
-};
-
-uniform samplerCube environment_map;
-uniform EnvMap
-{
- mat3 env_eye_matrix;
-};
-
layout(constant_id=auto) const int max_clip_planes = 0;
uniform Clipping
{
import common;
import shadow;
+struct BasicMaterialParameters
+{
+ vec4 diffuse;
+ vec4 specular;
+ vec4 emission;
+ float shininess;
+ float reflectivity;
+};
+
+uniform BasicMaterial
+{
+ BasicMaterialParameters basic_material;
+};
+
+uniform sampler2D diffuse_map;
+uniform sampler2D specular_map;
+uniform sampler2D shininess_map;
+uniform sampler2D emission_map;
+uniform sampler2D reflectivity_map;
+
layout(constant_id=auto) const bool use_diffuse_map = false;
layout(constant_id=auto) const bool use_specular = false;
layout(constant_id=auto) const bool use_specular_map = false;
import msp_interface;
+uniform ShadowMap
+{
+ float shadow_darkness;
+ mat4 shd_eye_matrix;
+};
+
+uniform sampler2DShadow shadow_map;
+
layout(constant_id=auto) const bool use_shadow_map = false;
#pragma MSP stage(vertex)