Skip to content

Commit

Permalink
Improve debug display UV0 and UV1 modes
Browse files Browse the repository at this point in the history
UV debug display modes now use frac() to display UVs outside the [0..1]² range.
  • Loading branch information
Benualdo committed Nov 16, 2024
1 parent ca1ace6 commit 4dd46d3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions data/Shaders/system/debugdisplay.hlsli
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,10 @@ float4 forwardDebugDisplay(float4 _color, DisplayMode _mode, uint _matID, float3
return _col;

case DisplayMode::Geometry_UV0:
return sRGBA2Linear(float4(_uv0.xy, 0, 1));
return sRGBA2Linear(float4(frac(_uv0.xy), any(saturate(_uv0) != _uv0) ? 1 : 0, 1));

case DisplayMode::Geometry_UV1:
return sRGBA2Linear(float4(_uv1.xy, 0, 1));
return sRGBA2Linear(float4(frac(_uv1.xy), any(saturate(_uv0) != _uv0) ? 1 : 0, 1));

case DisplayMode::Material_Albedo:
return float4(_albedo.rgb, 1);
Expand Down

0 comments on commit 4dd46d3

Please sign in to comment.