Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathan hoffstadt committed Feb 27, 2025
1 parent 3bd8fdf commit edb54db
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions shaders/picking.frag
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ layout(std140, set = 1, binding = 0) buffer _tBufferOut0{
// [SECTION] input & output
//-----------------------------------------------------------------------------

layout(early_fragment_tests) in;

// input
layout(location = 0) flat in struct plShaderIn {
vec2 tMousePos;
Expand All @@ -35,13 +37,13 @@ void main()
float CurrentDepth = gl_FragCoord.z;
float MaxDepth = tResultOut.fDepth;

if(CurrentDepth > MaxDepth)
// if(CurrentDepth > MaxDepth)
{
tResultOut.uID = tShaderIn.uID;
tResultOut.fDepth = CurrentDepth;
}

}
}
outColor = vec4(1);
outColor = vec4(gl_FragCoord.z, 0, 0, 1);
}

0 comments on commit edb54db

Please # to comment.