Skip to content

Commit

Permalink
D3D12 Shader Debug Zoo: added a test case for f32tof16() & f16tof32()
Browse files Browse the repository at this point in the history
  • Loading branch information
Zorro666 committed Nov 20, 2024
1 parent dea24cd commit cb3bc8b
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions util/test/demos/d3d12/d3d12_shader_debug_zoo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -742,6 +742,13 @@ float4 main(v2f IN) : SV_Target0
float2 uv = posone * float2(0.55f, 0.48f);
return smileyint.Load(int3(uv*16,0));
}
if(IN.tri == 82)
{
uint f16_half = f32tof16(posone*0.5);
uint f16_one = f32tof16(posone*1.0);
uint f16_two = f32tof16(posone*2.0);
return float4(f16tof32(f16_half), f16tof32(f16_one), f16tof32(f16_two), 0.0f);
}
return float4(0.4f, 0.4f, 0.4f, 0.4f);
}
Expand Down

0 comments on commit cb3bc8b

Please sign in to comment.