qvolray
changeset 37:450d4c50470f tip
- 16bit floating point textures halve gpu texture memory usage
- slower transfer function change
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Wed, 01 Jan 2014 00:23:57 +0200 |
parents | 70b937008134 |
children | |
files | src/volray.cc src/volume.cc |
diffstat | 2 files changed, 2 insertions(+), 2 deletions(-) [+] |
line diff
1.1 --- a/src/volray.cc Sun Apr 15 07:19:01 2012 +0300 1.2 +++ b/src/volray.cc Wed Jan 01 00:23:57 2014 +0200 1.3 @@ -338,7 +338,7 @@ 1.4 return; 1.5 1.6 xfer_mean += dx / (float)max_x; 1.7 - xfer_sdev += 0.5 * dy / (float)max_y; 1.8 + xfer_sdev += 0.1 * dy / (float)max_y; 1.9 1.10 xfer_mean = xfer_mean < 0.0 ? 0.0 : (xfer_mean > 1.0 ? 1.0 : xfer_mean); 1.11 xfer_sdev = xfer_sdev < 0.0 ? 0.0 : (xfer_sdev > 1.0 ? 1.0 : xfer_sdev);
2.1 --- a/src/volume.cc Sun Apr 15 07:19:01 2012 +0300 2.2 +++ b/src/volume.cc Wed Jan 01 00:23:57 2014 +0200 2.3 @@ -36,7 +36,7 @@ 2.4 glTexParameteri(GL_TEXTURE_3D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); 2.5 glTexParameteri(GL_TEXTURE_3D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); 2.6 glTexParameteri(GL_TEXTURE_3D, GL_TEXTURE_WRAP_R, GL_CLAMP_TO_EDGE); 2.7 - glTexImage3D(GL_TEXTURE_3D, 0, GL_RGBA32F_ARB, xsz, ysz, zsz, 0, GL_RGBA, GL_FLOAT, data); 2.8 + glTexImage3D(GL_TEXTURE_3D, 0, GL_RGBA16F_ARB, xsz, ysz, zsz, 0, GL_RGBA, GL_FLOAT, data); 2.9 } 2.10 2.11 bool Volume::load(const char *fname)