ogl_beamforming

Ultrasound Beamforming Implemented with OpenGL
git clone anongit@rnpnr.xyz:ogl_beamforming.git
Log | Files | Refs | Feed | Submodules | LICENSE

Commit: 899e6bfbc1913c6924aa20efae397f8dc9d7b42e
Parent: 010f9d593d452e339f356273ea60e119a5492f43
Author: Randy Palamar
Date:   Fri, 23 Aug 2024 13:43:34 -0600

render: use base 10 log instead of natural log for normalizing

Diffstat:
Mshaders/render.glsl | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/shaders/render.glsl b/shaders/render.glsl @@ -25,7 +25,7 @@ void main() float smp = texelFetch(u_out_data_tex, ivec3(coord.x, coord.y, 0), 0).x; float absmax = max(abs(min_max.y), abs(min_max.x)); - smp = 20 * log(abs(smp) / absmax); + smp = 20 * log(abs(smp) / absmax) / log(10); smp = clamp(smp, u_db_cutoff, 0) / u_db_cutoff; smp = 1 - smp;