qvolray

changeset 19:784d3d321caa

more demo
author John Tsiombikas <nuclear@member.fsf.org>
date Wed, 11 Apr 2012 06:44:06 +0300
parents 3d05c261a2f4
children 4c62be57fc1a
files qvolray.pro sdr/demo.p.glsl src/volray.cc
diffstat 3 files changed, 6 insertions(+), 5 deletions(-) [+]
line diff
     1.1 --- a/qvolray.pro	Wed Apr 11 06:08:59 2012 +0300
     1.2 +++ b/qvolray.pro	Wed Apr 11 06:44:06 2012 +0300
     1.3 @@ -3,6 +3,7 @@
     1.4  DEPENDPATH += . src
     1.5  INCLUDEPATH += . src
     1.6  QT += opengl
     1.7 +CONFIG += debug
     1.8  
     1.9  contains(QMAKE_CXX, g++) {
    1.10  	QMAKE_CXXFLAGS += -std=c++0x -pedantic
     2.1 --- a/sdr/demo.p.glsl	Wed Apr 11 06:08:59 2012 +0300
     2.2 +++ b/sdr/demo.p.glsl	Wed Apr 11 06:44:06 2012 +0300
     2.3 @@ -1,10 +1,10 @@
     2.4  void main()
     2.5  {
     2.6 -	float val = 0.0;
     2.7 +	float val = 0.7;
     2.8  	float len = length(gl_FragCoord.xyz);
     2.9 -	if(len < 0.5) {
    2.10 -		val = 1.0;
    2.11 -	}
    2.12 +	/*if(len < 0.5) {
    2.13 +		val = 0.7;
    2.14 +	}*/
    2.15  
    2.16  	gl_FragColor = vec4(gl_FragCoord.xyz / len, val);
    2.17  }
     3.1 --- a/src/volray.cc	Wed Apr 11 06:08:59 2012 +0300
     3.2 +++ b/src/volray.cc	Wed Apr 11 06:44:06 2012 +0300
     3.3 @@ -47,7 +47,7 @@
     3.4  static float xfer_mean = 0.7, xfer_sdev = 0.1;
     3.5  static bool xfertex_needs_recalc = true;
     3.6  
     3.7 -static float cur_z = 0.0;
     3.8 +static float cur_z = 0.5;
     3.9  static float ray_step = 0.01;
    3.10  
    3.11  static Volume *volume;