Thanks, I understand better now. But then the documentation about this is rather lacking. It is not stated that the parent material is just a template and that the actual final shader can actually…
You edit a file that is used in other part of the engine. Maybe it is better to duplicate the shader as overlay_edit_mesh_depth_vert.glsl
.
Cant we make that part of a header to avoid the duplication?
Be conservative in Z too. Bias far_box_t
by step_size to have one more iteration before and after.
I think the debug code is confusing and not isolated. Might be better to remove it. We don't need that in production (I mean the cost of having a separate framebuffer + clear etc...), you can just use an empty framebuffer for that.
Use exp2
instead of pow(2, x)
. Try to apply this everywhere.
Im' not sure why you are changing that for the debug visuals.
This only works because max_v2
is a define. Use vs_inflate_vector.xy
to avoid the confusion.
I didn't catch that first but has_next_pool_
is basically the list length. Might be worth renaming the variable.
I have to admit I'm a bit doubtful about what's the intent here. Is the lock thing inside the loop supposed to just slow down the waiting thread and avoid high CPU usage? This does feel hacky anyway.