Skip to content

Commit

Permalink
Disable specular on debug views.
Browse files Browse the repository at this point in the history
  • Loading branch information
TokisanGames committed Jan 4, 2024
1 parent 5b631e5 commit 1e68194
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions src/shaders/debug_views.glsl
Original file line number Diff line number Diff line change
Expand Up @@ -13,30 +13,35 @@ R"(
vec2 __i = 2.0 * (abs(fract((__p - 0.5 * __w) / 2.0) - 0.5) - abs(fract((__p + 0.5 * __w) / 2.0) - 0.5)) / __w;
ALBEDO = vec3((0.5 - 0.5 * __i.x * __i.y) * 0.2 + 0.2);
ROUGHNESS = 0.7;
SPECULAR = 0.;
NORMAL_MAP = vec3(0.5, 0.5, 1.0);

//INSERT: DEBUG_GREY
// Show all grey
ALBEDO = vec3(0.3);
ROUGHNESS = 0.7;
SPECULAR = 0.;
NORMAL_MAP = vec3(0.5, 0.5, 1.0);

//INSERT: DEBUG_HEIGHTMAP
// Show heightmap
ALBEDO = vec3(smoothstep(-0.1, 2.0, 0.5 + get_height(UV2)/300.0));
ROUGHNESS = 0.7;
SPECULAR = 0.;
NORMAL_MAP = vec3(0.5, 0.5, 1.0);

//INSERT: DEBUG_COLORMAP
// Show colormap
ALBEDO = color_map.rgb;
ROUGHNESS = 0.7;
SPECULAR = 0.;
NORMAL_MAP = vec3(0.5, 0.5, 1.0);

//INSERT: DEBUG_ROUGHMAP
// Show roughness map
ALBEDO = vec3(color_map.a);
ROUGHNESS = 0.7;
SPECULAR = 0.;
NORMAL_MAP = vec3(0.5, 0.5, 1.0);

//INSERT: DEBUG_CONTROL_TEXTURE
Expand All @@ -52,7 +57,8 @@ R"(
float(mat[2].over) * weights.z +
float(mat[3].over) * weights.w )/96.;
ALBEDO = vec3(__ctrl_base, __ctrl_over, 0.);
ROUGHNESS = 0.9;
ROUGHNESS = 1.;
SPECULAR = 0.;
NORMAL_MAP = vec3(0.5, 0.5, 1.0);

//INSERT: DEBUG_CONTROL_BLEND
Expand All @@ -63,31 +69,37 @@ R"(
float(mat[2].blend) * weights.z +
float(mat[3].blend) * weights.w );
ALBEDO = vec3(__ctrl_blend);
ROUGHNESS = 1.0;
ROUGHNESS = 1.;
SPECULAR = 0.;
NORMAL_MAP = vec3(0.5, 0.5, 1.0);

//INSERT: DEBUG_AUTOSHADER
ivec3 __ruv = get_region_uv(floor(UV));
uint __control = texelFetch(_control_maps, __ruv, 0).r;
float __autoshader = float( bool(__control & 0x1u) || __ruv.z<0 );
ALBEDO = vec3(__autoshader);
ROUGHNESS = 1.;
SPECULAR = 0.;

//INSERT: DEBUG_TEXTURE_HEIGHT
// Show height textures
ALBEDO = vec3(albedo_height.a);
ROUGHNESS = 0.7;
SPECULAR = 0.;
NORMAL_MAP = vec3(0.5, 0.5, 1.0);

//INSERT: DEBUG_TEXTURE_NORMAL
// Show normal map textures
ALBEDO = normal_rough.rgb;
ROUGHNESS = 0.7;
SPECULAR = 0.;
NORMAL_MAP = vec3(0.5, 0.5, 1.0);

//INSERT: DEBUG_TEXTURE_ROUGHNESS
// Show roughness textures
ALBEDO = vec3(normal_rough.a);
ROUGHNESS = 0.7;
SPECULAR = 0.;
NORMAL_MAP = vec3(0.5, 0.5, 1.0);

//INSERT: DEBUG_VERTEX_GRID
Expand Down

0 comments on commit 1e68194

Please sign in to comment.