Skip to content

Commit c0a6f3b

Browse files
committed
Fix selection on clipping plane
1 parent 46cdfd8 commit c0a6f3b

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

ngsolve_webgpu/clipping.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ def get_shader_code(self):
4545

4646
class ClippingCF(Renderer):
4747
compute_shader = "ngsolve/clipping/compute.wgsl"
48+
select_entry_point = "fragment_select_no_clipping"
4849
n_vertices = 3
4950
subdivision = 0
5051

ngsolve_webgpu/shaders/geo_vertex.wgsl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,5 +69,5 @@ fn fragmentQueryIndex(input: GeoVertexInput) -> @location(0) vec4<u32> {
6969
if(length(input.pos.xy - input.pos2.xy) > u_vertex_thickness/2.) {
7070
discard;
7171
}
72-
return vec4<u32>(@RENDER_OBJECT_ID@, bitcast<u32>(input.position.z/input.position.w), 0u, 0);
72+
return vec4<u32>(@RENDER_OBJECT_ID@, bitcast<u32>(input.position.z), 0u, 0);
7373
}

0 commit comments

Comments
 (0)