Commit: 19d43c1f709c3fbec39d89144c48eba490a51f5b
Parent: 5af1aa2f90d04acf504be924b1c2f41ff837aaef
Author: Randy Palamar
Date: Thu, 24 Apr 2025 16:08:17 -0600
ui/render: always display the middle slice when beamforming a volume
This was what was intended before. Obviously this needs to be
refactored to allow modification via the UI.
Diffstat:
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/shaders/render.glsl b/shaders/render.glsl
@@ -12,13 +12,13 @@ vec3 hsv2rgb(vec3 hsv)
void main()
{
- ivec2 out_data_dim = textureSize(u_out_data_tex, 0).xz;
+ ivec3 out_data_dim = textureSize(u_out_data_tex, 0);
//vec2 min_max = texelFetch(u_out_data_tex, ivec3(0), textureQueryLevels(u_out_data_tex) - 1).xy;
/* TODO(rnp): select between x and y and specify slice */
- ivec2 coord = ivec2(fragment_texture_coordinate * vec2(out_data_dim));
- ivec3 smp_coord = ivec3(coord.x, 0, coord.y);
+ ivec2 coord = ivec2(fragment_texture_coordinate * vec2(out_data_dim.xz));
+ ivec3 smp_coord = ivec3(coord.x, out_data_dim.y / 2, coord.y);
float smp = length(texelFetch(u_out_data_tex, smp_coord, 0).xy);
float threshold_val = pow(10.0f, u_threshold / 20.0f);