Added ViewMaterials experimental shader

This commit is contained in:
Joshua Barretto 2022-12-30 16:42:56 +00:00
parent 9098abc3d2
commit 367ec3e8f4
2 changed files with 14 additions and 1 deletions

View File

@ -89,6 +89,17 @@ void main() {
tgt_color = vec4(vec3(mat.xyz) / 255.0, 1);
return;
#endif
#ifdef EXPERIMENTAL_VIEWMATERIALS
const vec3 mat_colors[5] = vec3[](
vec3(0, 1, 1), // MAT_SKY
vec3(1, 1, 0), // MAT_BLOCK
vec3(0, 0, 1), // MAT_FLUID
vec3(1, 0, 1), // MAT_FIGURE
vec3(0.5, 1, 0) // MAT_LOD
);
tgt_color = vec4(mat_colors[mat.a % 5u], 1);
return;
#endif
#ifdef EXPERIMENTAL_BAREMINIMUM
tgt_color = vec4(color.rgb, 1);

View File

@ -527,6 +527,8 @@ pub enum ExperimentalShader {
NoRainbows,
/// Add extra detailing to puddles.
PuddleDetails,
/// Show the normal buffers.
/// Show gbuffer surface normals.
ViewNormals,
/// Show gbuffer materials.
ViewMaterials,
}