uniform sampler3D volume ; uniform float sampleRate ; uniform float isoValue ; uniform vec4 isoColor ; varying vec4 texCoord0 ; void main ( ) { floast steps = 1.0 / sampleRate ; vec4 outputColor = vec4 ( 0 ., 0 ., 0 ., 0 . ) ; float isoThr ; // get ray position and ray direction vec4 vPosition = gl_ModelViewMatrixInverse [ 3 ] ; vec3 rayPosition = texCoord0 . xyz ; vec3 vecDif = rayPosition - vPosition . xyz ; vec3 rayDirection = sampleRate * normalize ( vecDif ) ; // for all samples along the ray while ( steps ) { steps --; // get trilinear interpolated value from 3d texture float value = texture3D ( volume , rayPosition ) ; isoThr = value - isoValue ; // check if we get isosurface line if ( isoThr < 0 ) { // march to the next sample rayPosition = rayPosition + rayDirection ; // get next density continue ; } // else we do color transformation outputColor = isoColor ; outputColor . rgb = outputColor . rgb * outputColor . a ; #ifdef SHADER // do shading #endif break ; } gl_FragColor . rgba = outputColor ; }
uniform sampler3D volume ; uniform float sampleRate ; uniform float isoValue ; uniform vec4 isoColor ; varying vec4 texCoord0 ; void main ( ) { floast steps = 1.0 / sampleRate ; vec4 outputColor = vec4 ( 0 ., 0 ., 0 ., 0 . ) ; float isoThr ; // get ray position and ray direction vec4 vPosition = gl_ModelViewMatrixInverse [ 3 ] ; vec3 rayPosition = texCoord0 . xyz ; vec3 vecDif = rayPosition - vPosition . xyz ; vec3 rayDirection = sampleRate * normalize ( vecDif ) ; // for all samples along the ray while ( steps ) { steps --; // get trilinear interpolated value from 3d texture float value = texture3D ( volume , rayPosition ) ; isoThr = value - isoValue ; // check if we get isosurface line if ( isoThr < 0 ) { // march to the next sample rayPosition = rayPosition + rayDirection ; // get next density continue ; } // else we do color transformation outputColor = isoColor ; outputColor . rgb = outputColor . rgb * outputColor . a ; #ifdef SHADER // do shading #endif break ; } gl_FragColor . rgba = outputColor ; }
uniform sampler3D volume ; uniform float sampleRate ; uniform float isoValue ; uniform vec4 isoColor ; varying vec4 texCoord0 ; void main ( ) { floast steps = 1.0 / sampleRate ; vec4 outputColor = vec4 ( 0 ., 0 ., 0 ., 0 . ) ; float isoThr ; // get ray position and ray direction vec4 vPosition = gl_ModelViewMatrixInverse [ 3 ] ; vec3 rayPosition = texCoord0 . xyz ; vec3 vecDif = rayPosition - vPosition . xyz ; vec3 rayDirection = sampleRate * normalize ( vecDif ) ; // for all samples along the ray while ( steps ) { steps --; // get trilinear interpolated value from 3d texture float value = texture3D ( volume , rayPosition ) ; isoThr = value - isoValue ; // check if we get isosurface line if ( isoThr < 0 ) { // march to the next sample rayPosition = rayPosition + rayDirection ; // get next density continue ; } // else we do color transformation outputColor = isoColor ; outputColor . rgb = outputColor . rgb * outputColor . a ; #ifdef SHADER // do shading #endif break ; } gl_FragColor . rgba = outputColor ; }
uniform sampler3D volume ; uniform float sampleRate ; uniform float isoValue ; uniform vec4 isoColor ; varying vec4 texCoord0 ; void main ( ) { floast steps = 1.0 / sampleRate ; vec4 outputColor = vec4 ( 0 ., 0 ., 0 ., 0 . ) ; float isoThr ; // get ray position and ray direction vec4 vPosition = gl_ModelViewMatrixInverse [ 3 ] ; vec3 rayPosition = texCoord0 . xyz ; vec3 vecDif = rayPosition - vPosition . xyz ; vec3 rayDirection = sampleRate * normalize ( vecDif ) ; // for all samples along the ray while ( steps ) { steps --; // get trilinear interpolated value from 3d texture float value = texture3D ( volume , rayPosition ) ; isoThr = value - isoValue ; // check if we get isosurface line if ( isoThr < 0 ) { // march to the next sample rayPosition = rayPosition + rayDirection ; // get next density continue ; } // else we do color transformation outputColor = isoColor ; outputColor . rgb = outputColor . rgb * outputColor . a ; #ifdef SHADER // do shading #endif break ; } gl_FragColor . rgba = outputColor ; }
uniform sampler3D volume ; uniform float sampleRate ; uniform float isoValue ; uniform vec4 isoColor ; varying vec4 texCoord0 ; void main ( ) { floast steps = 1.0 / sampleRate ; vec4 outputColor = vec4 ( 0 ., 0 ., 0 ., 0 . ) ; float isoThr ; // get ray position and ray direction vec4 vPosition = gl_ModelViewMatrixInverse [ 3 ] ; vec3 rayPosition = texCoord0 . xyz ; vec3 vecDif = rayPosition - vPosition . xyz ; vec3 rayDirection = sampleRate * normalize ( vecDif ) ; // for all samples along the ray while ( steps ) { steps --; // get trilinear interpolated value from 3d texture float value = texture3D ( volume , rayPosition ) ; isoThr = value - isoValue ; // check if we get isosurface line if ( isoThr < 0 ) { // march to the next sample rayPosition = rayPosition + rayDirection ; // get next density continue ; } // else we do color transformation outputColor = isoColor ; outputColor . rgb = outputColor . rgb * outputColor . a ; #ifdef SHADER // do shading #endif break ; } gl_FragColor . rgba = outputColor ; }
uniform sampler3D volume ; uniform float sampleRate ; uniform float isoValue ; uniform vec4 isoColor ; varying vec4 texCoord0 ; void main ( ) { floast steps = 1.0 / sampleRate ; vec4 outputColor = vec4 ( 0 ., 0 ., 0 ., 0 . ) ; float isoThr ; // get ray position and ray direction vec4 vPosition = gl_ModelViewMatrixInverse [ 3 ] ; vec3 rayPosition = texCoord0 . xyz ; vec3 vecDif = rayPosition - vPosition . xyz ; vec3 rayDirection = sampleRate * normalize ( vecDif ) ; // for all samples along the ray while ( steps ) { steps --; // get trilinear interpolated value from 3d texture float value = texture3D ( volume , rayPosition ) ; isoThr = value - isoValue ; // check if we get isosurface line if ( isoThr < 0 ) { // march to the next sample rayPosition = rayPosition + rayDirection ; // get next density continue ; } // else we do color transformation outputColor = isoColor ; outputColor . rgb = outputColor . rgb * outputColor . a ; #ifdef SHADER // do shading #endif break ; } gl_FragColor . rgba = outputColor ; }
uniform sampler3D volume ; uniform float sampleRate ; uniform float isoValue ; uniform vec4 isoColor ; varying vec4 texCoord0 ; void main ( ) { floast steps = 1.0 / sampleRate ; vec4 outputColor = vec4 ( 0 ., 0 ., 0 ., 0 . ) ; float isoThr ; // get ray position and ray direction vec4 vPosition = gl_ModelViewMatrixInverse [ 3 ] ; vec3 rayPosition = texCoord0 . xyz ; vec3 vecDif = rayPosition - vPosition . xyz ; vec3 rayDirection = sampleRate * normalize ( vecDif ) ; // for all samples along the ray while ( steps ) { steps --; // get trilinear interpolated value from 3d texture float value = texture3D ( volume , rayPosition ) ; isoThr = value - isoValue ; // check if we get isosurface line if ( isoThr < 0 ) { // march to the next sample rayPosition = rayPosition + rayDirection ; // get next density continue ; } // else we do color transformation outputColor = isoColor ; outputColor . rgb = outputColor . rgb * outputColor . a ; #ifdef SHADER // do shading #endif break ; } gl_FragColor . rgba = outputColor ; }
uniform sampler3D volume ; uniform float sampleRate ; uniform float isoValue ; uniform vec4 isoColor ; varying vec4 texCoord0 ; void main ( ) { floast steps = 1.0 / sampleRate ; vec4 outputColor = vec4 ( 0 ., 0 ., 0 ., 0 . ) ; float isoThr ; // get ray position and ray direction vec4 vPosition = gl_ModelViewMatrixInverse [ 3 ] ; vec3 rayPosition = texCoord0 . xyz ; vec3 vecDif = rayPosition - vPosition . xyz ; vec3 rayDirection = sampleRate * normalize ( vecDif ) ; // for all samples along the ray while ( steps ) { steps --; // get trilinear interpolated value from 3d texture float value = texture3D ( volume , rayPosition ) ; isoThr = value - isoValue ; // check if we get isosurface line if ( isoThr < 0 ) { // march to the next sample rayPosition = rayPosition + rayDirection ; // get next density continue ; } // else we do color transformation outputColor = isoColor ; outputColor . rgb = outputColor . rgb * outputColor . a ; #ifdef SHADER // do shading #endif break ; } gl_FragColor . rgba = outputColor ; }
uniform sampler3D volume ; uniform float sampleRate ; uniform float isoValue ; uniform vec4 isoColor ; varying vec4 texCoord0 ; void main ( ) { floast steps = 1.0 / sampleRate ; vec4 outputColor = vec4 ( 0 ., 0 ., 0 ., 0 . ) ; float isoThr ; // get ray position and ray direction vec4 vPosition = gl_ModelViewMatrixInverse [ 3 ] ; vec3 rayPosition = texCoord0 . xyz ; vec3 vecDif = rayPosition - vPosition . xyz ; vec3 rayDirection = sampleRate * normalize ( vecDif ) ; // for all samples along the ray while ( steps ) { steps --; // get trilinear interpolated value from 3d texture float value = texture3D ( volume , rayPosition ) ; isoThr = value - isoValue ; // check if we get isosurface line if ( isoThr < 0 ) { // march to the next sample rayPosition = rayPosition + rayDirection ; // get next density continue ; } // else we do color transformation outputColor = isoColor ; outputColor . rgb = outputColor . rgb * outputColor . a ; #ifdef SHADER // do shading #endif break ; } gl_FragColor . rgba = outputColor ; }
uniform sampler3D volume ; uniform float sampleRate ; uniform float isoValue ; uniform vec4 isoColor ; varying vec4 texCoord0 ; void main ( ) { floast steps = 1.0 / sampleRate ; vec4 outputColor = vec4 ( 0 ., 0 ., 0 ., 0 . ) ; float isoThr ; // get ray position and ray direction vec4 vPosition = gl_ModelViewMatrixInverse [ 3 ] ; vec3 rayPosition = texCoord0 . xyz ; vec3 vecDif = rayPosition - vPosition . xyz ; vec3 rayDirection = sampleRate * normalize ( vecDif ) ; // for all samples along the ray while ( steps ) { steps --; // get trilinear interpolated value from 3d texture float value = texture3D ( volume , rayPosition ) ; isoThr = value - isoValue ; // check if we get isosurface line if ( isoThr < 0 ) { // march to the next sample rayPosition = rayPosition + rayDirection ; // get next density continue ; } // else we do color transformation outputColor = isoColor ; outputColor . rgb = outputColor . rgb * outputColor . a ; #ifdef SHADER // do shading #endif break ; } gl_FragColor . rgba = outputColor ; }
uniform sampler3D volume ; uniform float sampleRate ; uniform float isoValue ; uniform vec4 isoColor ; varying vec4 texCoord0 ; void main ( ) { floast steps = 1.0 / sampleRate ; vec4 outputColor = vec4 ( 0 ., 0 ., 0 ., 0 . ) ; float isoThr ; // get ray position and ray direction vec4 vPosition = gl_ModelViewMatrixInverse [ 3 ] ; vec3 rayPosition = texCoord0 . xyz ; vec3 vecDif = rayPosition - vPosition . xyz ; vec3 rayDirection = sampleRate * normalize ( vecDif ) ; // for all samples along the ray while ( steps ) { steps --; // get trilinear interpolated value from 3d texture float value = texture3D ( volume , rayPosition ) ; isoThr = value - isoValue ; // check if we get isosurface line if ( isoThr < 0 ) { // march to the next sample rayPosition = rayPosition + rayDirection ; // get next density continue ; } // else we do color transformation outputColor = isoColor ; outputColor . rgb = outputColor . rgb * outputColor . a ; #ifdef SHADER // do shading #endif break ; } gl_FragColor . rgba = outputColor ; }
uniform sampler3D volume ; uniform float sampleRate ; uniform float isoValue ; uniform vec4 isoColor ; varying vec4 texCoord0 ; void main ( ) { floast steps = 1.0 / sampleRate ; vec4 outputColor = vec4 ( 0 ., 0 ., 0 ., 0 . ) ; float isoThr ; // get ray position and ray direction vec4 vPosition = gl_ModelViewMatrixInverse [ 3 ] ; vec3 rayPosition = texCoord0 . xyz ; vec3 vecDif = rayPosition - vPosition . xyz ; vec3 rayDirection = sampleRate * normalize ( vecDif ) ; // for all samples along the ray while ( steps ) { steps --; // get trilinear interpolated value from 3d texture float value = texture3D ( volume , rayPosition ) ; isoThr = value - isoValue ; // check if we get isosurface line if ( isoThr < 0 ) { // march to the next sample rayPosition = rayPosition + rayDirection ; // get next density continue ; } // else we do color transformation outputColor = isoColor ; outputColor . rgb = outputColor . rgb * outputColor . a ; #ifdef SHADER // do shading #endif break ; } gl_FragColor . rgba = outputColor ; }
uniform sampler3D volume ; uniform float sampleRate ; uniform float isoValue ; uniform vec4 isoColor ; varying vec4 texCoord0 ; void main ( ) { floast steps = 1.0 / sampleRate ; vec4 outputColor = vec4 ( 0 ., 0 ., 0 ., 0 . ) ; float isoThr ; // get ray position and ray direction vec4 vPosition = gl_ModelViewMatrixInverse [ 3 ] ; vec3 rayPosition = texCoord0 . xyz ; vec3 vecDif = rayPosition - vPosition . xyz ; vec3 rayDirection = sampleRate * normalize ( vecDif ) ; // for all samples along the ray while ( steps ) { steps --; // get trilinear interpolated value from 3d texture float value = texture3D ( volume , rayPosition ) ; isoThr = value - isoValue ; // check if we get isosurface line if ( isoThr < 0 ) { // march to the next sample rayPosition = rayPosition + rayDirection ; // get next density continue ; } // else we do color transformation outputColor = isoColor ; outputColor . rgb = outputColor . rgb * outputColor . a ; #ifdef SHADER // do shading #endif break ; } gl_FragColor . rgba = outputColor ; }
uniform sampler3D volume ; uniform float sampleRate ; uniform float isoValue ; uniform vec4 isoColor ; varying vec4 texCoord0 ; void main ( ) { floast steps = 1.0 / sampleRate ; vec4 outputColor = vec4 ( 0 ., 0 ., 0 ., 0 . ) ; float isoThr ; // get ray position and ray direction vec4 vPosition = gl_ModelViewMatrixInverse [ 3 ] ; vec3 rayPosition = texCoord0 . xyz ; vec3 vecDif = rayPosition - vPosition . xyz ; vec3 rayDirection = sampleRate * normalize ( vecDif ) ; // for all samples along the ray while ( steps ) { steps --; // get trilinear interpolated value from 3d texture float value = texture3D ( volume , rayPosition ) ; isoThr = value - isoValue ; // check if we get isosurface line if ( isoThr < 0 ) { // march to the next sample rayPosition = rayPosition + rayDirection ; // get next density continue ; } // else we do color transformation outputColor = isoColor ; outputColor . rgb = outputColor . rgb * outputColor . a ; #ifdef SHADER // do shading #endif break ; } gl_FragColor . rgba = outputColor ; }
uniform sampler3D volume ; uniform float sampleRate ; uniform float isoValue ; uniform vec4 isoColor ; varying vec4 texCoord0 ; void main ( ) { floast steps = 1.0 / sampleRate ; vec4 outputColor = vec4 ( 0 ., 0 ., 0 ., 0 . ) ; float isoThr ; // get ray position and ray direction vec4 vPosition = gl_ModelViewMatrixInverse [ 3 ] ; vec3 rayPosition = texCoord0 . xyz ; vec3 vecDif = rayPosition - vPosition . xyz ; vec3 rayDirection = sampleRate * normalize ( vecDif ) ; // for all samples along the ray while ( steps ) { steps --; // get trilinear interpolated value from 3d texture float value = texture3D ( volume , rayPosition ) ; isoThr = value - isoValue ; // check if we get isosurface line if ( isoThr < 0 ) { // march to the next sample rayPosition = rayPosition + rayDirection ; // get next density continue ; } // else we do color transformation outputColor = isoColor ; outputColor . rgb = outputColor . rgb * outputColor . a ; #ifdef SHADER // do shading #endif break ; } gl_FragColor . rgba = outputColor ; }
uniform sampler3D volume ; uniform float sampleRate ; uniform float isoValue ; uniform vec4 isoColor ; varying vec4 texCoord0 ; void main ( ) { floast steps = 1.0 / sampleRate ; vec4 outputColor = vec4 ( 0 ., 0 ., 0 ., 0 . ) ; float isoThr ; // get ray position and ray direction vec4 vPosition = gl_ModelViewMatrixInverse [ 3 ] ; vec3 rayPosition = texCoord0 . xyz ; vec3 vecDif = rayPosition - vPosition . xyz ; vec3 rayDirection = sampleRate * normalize ( vecDif ) ; // for all samples along the ray while ( steps ) { steps --; // get trilinear interpolated value from 3d texture float value = texture3D ( volume , rayPosition ) ; isoThr = value - isoValue ; // check if we get isosurface line if ( isoThr < 0 ) { // march to the next sample rayPosition = rayPosition + rayDirection ; // get next density continue ; } // else we do color transformation outputColor = isoColor ; outputColor . rgb = outputColor . rgb * outputColor . a ; #ifdef SHADER // do shading #endif break ; } gl_FragColor . rgba = outputColor ; }
uniform sampler3D volume ; uniform float sampleRate ; uniform float isoValue ; uniform vec4 isoColor ; varying vec4 texCoord0 ; void main ( ) { floast steps = 1.0 / sampleRate ; vec4 outputColor = vec4 ( 0 ., 0 ., 0 ., 0 . ) ; float isoThr ; // get ray position and ray direction vec4 vPosition = gl_ModelViewMatrixInverse [ 3 ] ; vec3 rayPosition = texCoord0 . xyz ; vec3 vecDif = rayPosition - vPosition . xyz ; vec3 rayDirection = sampleRate * normalize ( vecDif ) ; // for all samples along the ray while ( steps ) { steps --; // get trilinear interpolated value from 3d texture float value = texture3D ( volume , rayPosition ) ; isoThr = value - isoValue ; // check if we get isosurface line if ( isoThr < 0 ) { // march to the next sample rayPosition = rayPosition + rayDirection ; // get next density continue ; } // else we do color transformation outputColor = isoColor ; outputColor . rgb = outputColor . rgb * outputColor . a ; #ifdef SHADER // do shading #endif break ; } gl_FragColor . rgba = outputColor ; }
uniform sampler3D volume ; uniform float sampleRate ; uniform float isoValue ; uniform vec4 isoColor ; varying vec4 texCoord0 ; void main ( ) { floast steps = 1.0 / sampleRate ; vec4 outputColor = vec4 ( 0 ., 0 ., 0 ., 0 . ) ; float isoThr ; // get ray position and ray direction vec4 vPosition = gl_ModelViewMatrixInverse [ 3 ] ; vec3 rayPosition = texCoord0 . xyz ; vec3 vecDif = rayPosition - vPosition . xyz ; vec3 rayDirection = sampleRate * normalize ( vecDif ) ; // for all samples along the ray while ( steps ) { steps --; // get trilinear interpolated value from 3d texture float value = texture3D ( volume , rayPosition ) ; isoThr = value - isoValue ; // check if we get isosurface line if ( isoThr < 0 ) { // march to the next sample rayPosition = rayPosition + rayDirection ; // get next density continue ; } // else we do color transformation outputColor = isoColor ; outputColor . rgb = outputColor . rgb * outputColor . a ; #ifdef SHADER // do shading #endif break ; } gl_FragColor . rgba = outputColor ; }
uniform sampler3D volume ; uniform float sampleRate ; uniform float isoValue ; uniform vec4 isoColor ; varying vec4 texCoord0 ; void main ( ) { floast steps = 1.0 / sampleRate ; vec4 outputColor = vec4 ( 0 ., 0 ., 0 ., 0 . ) ; float isoThr ; // get ray position and ray direction vec4 vPosition = gl_ModelViewMatrixInverse [ 3 ] ; vec3 rayPosition = texCoord0 . xyz ; vec3 vecDif = rayPosition - vPosition . xyz ; vec3 rayDirection = sampleRate * normalize ( vecDif ) ; // for all samples along the ray while ( steps ) { steps --; // get trilinear interpolated value from 3d texture float value = texture3D ( volume , rayPosition ) ; isoThr = value - isoValue ; // check if we get isosurface line if ( isoThr < 0 ) { // march to the next sample rayPosition = rayPosition + rayDirection ; // get next density continue ; } // else we do color transformation outputColor = isoColor ; outputColor . rgb = outputColor . rgb * outputColor . a ; #ifdef SHADER // do shading #endif break ; } gl_FragColor . rgba = outputColor ; }
uniform sampler3D volume ; uniform float sampleRate ; uniform float isoValue ; uniform vec4 isoColor ; varying vec4 texCoord0 ; void main ( ) { floast steps = 1.0 / sampleRate ; vec4 outputColor = vec4 ( 0 ., 0 ., 0 ., 0 . ) ; float isoThr ; // get ray position and ray direction vec4 vPosition = gl_ModelViewMatrixInverse [ 3 ] ; vec3 rayPosition = texCoord0 . xyz ; vec3 vecDif = rayPosition - vPosition . xyz ; vec3 rayDirection = sampleRate * normalize ( vecDif ) ; // for all samples along the ray while ( steps ) { steps --; // get trilinear interpolated value from 3d texture float value = texture3D ( volume , rayPosition ) ; isoThr = value - isoValue ; // check if we get isosurface line if ( isoThr < 0 ) { // march to the next sample rayPosition = rayPosition + rayDirection ; // get next density continue ; } // else we do color transformation outputColor = isoColor ; outputColor . rgb = outputColor . rgb * outputColor . a ; #ifdef SHADER // do shading #endif break ; } gl_FragColor . rgba = outputColor ; }
uniform sampler3D volume ; uniform float sampleRate ; uniform float isoValue ; uniform vec4 isoColor ; varying vec4 texCoord0 ; void main ( ) { floast steps = 1.0 / sampleRate ; vec4 outputColor = vec4 ( 0 ., 0 ., 0 ., 0 . ) ; float isoThr ; // get ray position and ray direction vec4 vPosition = gl_ModelViewMatrixInverse [ 3 ] ; vec3 rayPosition = texCoord0 . xyz ; vec3 vecDif = rayPosition - vPosition . xyz ; vec3 rayDirection = sampleRate * normalize ( vecDif ) ; // for all samples along the ray while ( steps ) { steps --; // get trilinear interpolated value from 3d texture float value = texture3D ( volume , rayPosition ) ; isoThr = value - isoValue ; // check if we get isosurface line if ( isoThr < 0 ) { // march to the next sample rayPosition = rayPosition + rayDirection ; // get next density continue ; } // else we do color transformation outputColor = isoColor ; outputColor . rgb = outputColor . rgb * outputColor . a ; #ifdef SHADER // do shading #endif break ; } gl_FragColor . rgba = outputColor ; }
uniform sampler3D volume ; uniform float sampleRate ; uniform float isoValue ; uniform vec4 isoColor ; varying vec4 texCoord0 ; void main ( ) { floast steps = 1.0 / sampleRate ; vec4 outputColor = vec4 ( 0 ., 0 ., 0 ., 0 . ) ; float isoThr ; // get ray position and ray direction vec4 vPosition = gl_ModelViewMatrixInverse [ 3 ] ; vec3 rayPosition = texCoord0 . xyz ; vec3 vecDif = rayPosition - vPosition . xyz ; vec3 rayDirection = sampleRate * normalize ( vecDif ) ; // for all samples along the ray while ( steps ) { steps --; // get trilinear interpolated value from 3d texture float value = texture3D ( volume , rayPosition ) ; isoThr = value - isoValue ; // check if we get isosurface line if ( isoThr < 0 ) { // march to the next sample rayPosition = rayPosition + rayDirection ; // get next density continue ; } // else we do color transformation outputColor = isoColor ; outputColor . rgb = outputColor . rgb * outputColor . a ; #ifdef SHADER // do shading #endif break ; } gl_FragColor . rgba = outputColor ; }
uniform sampler3D volume ; uniform float sampleRate ; uniform float isoValue ; uniform vec4 isoColor ; varying vec4 texCoord0 ; void main ( ) { floast steps = 1.0 / sampleRate ; vec4 outputColor = vec4 ( 0 ., 0 ., 0 ., 0 . ) ; float isoThr ; // get ray position and ray direction vec4 vPosition = gl_ModelViewMatrixInverse [ 3 ] ; vec3 rayPosition = texCoord0 . xyz ; vec3 vecDif = rayPosition - vPosition . xyz ; vec3 rayDirection = sampleRate * normalize ( vecDif ) ; // for all samples along the ray while ( steps ) { steps --; // get trilinear interpolated value from 3d texture float value = texture3D ( volume , rayPosition ) ; isoThr = value - isoValue ; // check if we get isosurface line if ( isoThr < 0 ) { // march to the next sample rayPosition = rayPosition + rayDirection ; // get next density continue ; } // else we do color transformation outputColor = isoColor ; outputColor . rgb = outputColor . rgb * outputColor . a ; #ifdef SHADER // do shading #endif break ; } gl_FragColor . rgba = outputColor ; }
uniform sampler3D volume ; uniform float sampleRate ; uniform float isoValue ; uniform vec4 isoColor ; varying vec4 texCoord0 ; void main ( ) { floast steps = 1.0 / sampleRate ; vec4 outputColor = vec4 ( 0 ., 0 ., 0 ., 0 . ) ; float isoThr ; // get ray position and ray direction vec4 vPosition = gl_ModelViewMatrixInverse [ 3 ] ; vec3 rayPosition = texCoord0 . xyz ; vec3 vecDif = rayPosition - vPosition . xyz ; vec3 rayDirection = sampleRate * normalize ( vecDif ) ; // for all samples along the ray while ( steps ) { steps --; // get trilinear interpolated value from 3d texture float value = texture3D ( volume , rayPosition ) ; isoThr = value - isoValue ; // check if we get isosurface line if ( isoThr < 0 ) { // march to the next sample rayPosition = rayPosition + rayDirection ; // get next density continue ; } // else we do color transformation outputColor = isoColor ; outputColor . rgb = outputColor . rgb * outputColor . a ; #ifdef SHADER // do shading #endif break ; } gl_FragColor . rgba = outputColor ; }
uniform sampler3D volume ; uniform float sampleRate ; uniform float isoValue ; uniform vec4 isoColor ; varying vec4 texCoord0 ; void main ( ) { floast steps = 1.0 / sampleRate ; vec4 outputColor = vec4 ( 0 ., 0 ., 0 ., 0 . ) ; float isoThr ; // get ray position and ray direction vec4 vPosition = gl_ModelViewMatrixInverse [ 3 ] ; vec3 rayPosition = texCoord0 . xyz ; vec3 vecDif = rayPosition - vPosition . xyz ; vec3 rayDirection = sampleRate * normalize ( vecDif ) ; // for all samples along the ray while ( steps ) { steps --; // get trilinear interpolated value from 3d texture float value = texture3D ( volume , rayPosition ) ; isoThr = value - isoValue ; // check if we get isosurface line if ( isoThr < 0 ) { // march to the next sample rayPosition = rayPosition + rayDirection ; // get next density continue ; } // else we do color transformation outputColor = isoColor ; outputColor . rgb = outputColor . rgb * outputColor . a ; #ifdef SHADER // do shading #endif break ; } gl_FragColor . rgba = outputColor ; }
uniform sampler3D volume ; uniform float sampleRate ; uniform float isoValue ; uniform vec4 isoColor ; varying vec4 texCoord0 ; void main ( ) { floast steps = 1.0 / sampleRate ; vec4 outputColor = vec4 ( 0 ., 0 ., 0 ., 0 . ) ; float isoThr ; // get ray position and ray direction vec4 vPosition = gl_ModelViewMatrixInverse [ 3 ] ; vec3 rayPosition = texCoord0 . xyz ; vec3 vecDif = rayPosition - vPosition . xyz ; vec3 rayDirection = sampleRate * normalize ( vecDif ) ; // for all samples along the ray while ( steps ) { steps --; // get trilinear interpolated value from 3d texture float value = texture3D ( volume , rayPosition ) ; isoThr = value - isoValue ; // check if we get isosurface line if ( isoThr < 0 ) { // march to the next sample rayPosition = rayPosition + rayDirection ; // get next density continue ; } // else we do color transformation outputColor = isoColor ; outputColor . rgb = outputColor . rgb * outputColor . a ; #ifdef SHADER // do shading #endif break ; } gl_FragColor . rgba = outputColor ; }
uniform sampler3D volume ; uniform float sampleRate ; uniform float isoValue ; uniform vec4 isoColor ; varying vec4 texCoord0 ; void main ( ) { floast steps = 1.0 / sampleRate ; vec4 outputColor = vec4 ( 0 ., 0 ., 0 ., 0 . ) ; float isoThr ; // get ray position and ray direction vec4 vPosition = gl_ModelViewMatrixInverse [ 3 ] ; vec3 rayPosition = texCoord0 . xyz ; vec3 vecDif = rayPosition - vPosition . xyz ; vec3 rayDirection = sampleRate * normalize ( vecDif ) ; // for all samples along the ray while ( steps ) { steps --; // get trilinear interpolated value from 3d texture float value = texture3D ( volume , rayPosition ) ; isoThr = value - isoValue ; // check if we get isosurface line if ( isoThr < 0 ) { // march to the next sample rayPosition = rayPosition + rayDirection ; // get next density continue ; } // else we do color transformation outputColor = isoColor ; outputColor . rgb = outputColor . rgb * outputColor . a ; #ifdef SHADER // do shading #endif break ; } gl_FragColor . rgba = outputColor ; }
uniform sampler3D volume ; uniform float sampleRate ; uniform float isoValue ; uniform vec4 isoColor ; varying vec4 texCoord0 ; void main ( ) { floast steps = 1.0 / sampleRate ; vec4 outputColor = vec4 ( 0 ., 0 ., 0 ., 0 . ) ; float isoThr ; // get ray position and ray direction vec4 vPosition = gl_ModelViewMatrixInverse [ 3 ] ; vec3 rayPosition = texCoord0 . xyz ; vec3 vecDif = rayPosition - vPosition . xyz ; vec3 rayDirection = sampleRate * normalize ( vecDif ) ; // for all samples along the ray while ( steps ) { steps --; // get trilinear interpolated value from 3d texture float value = texture3D ( volume , rayPosition ) ; isoThr = value - isoValue ; // check if we get isosurface line if ( isoThr < 0 ) { // march to the next sample rayPosition = rayPosition + rayDirection ; // get next density continue ; } // else we do color transformation outputColor = isoColor ; outputColor . rgb = outputColor . rgb * outputColor . a ; #ifdef SHADER // do shading #endif break ; } gl_FragColor . rgba = outputColor ; }
uniform sampler3D volume ; uniform float sampleRate ; uniform float isoValue ; uniform vec4 isoColor ; varying vec4 texCoord0 ; void main ( ) { floast steps = 1.0 / sampleRate ; vec4 outputColor = vec4 ( 0 ., 0 ., 0 ., 0 . ) ; float isoThr ; // get ray position and ray direction vec4 vPosition = gl_ModelViewMatrixInverse [ 3 ] ; vec3 rayPosition = texCoord0 . xyz ; vec3 vecDif = rayPosition - vPosition . xyz ; vec3 rayDirection = sampleRate * normalize ( vecDif ) ; // for all samples along the ray while ( steps ) { steps --; // get trilinear interpolated value from 3d texture float value = texture3D ( volume , rayPosition ) ; isoThr = value - isoValue ; // check if we get isosurface line if ( isoThr < 0 ) { // march to the next sample rayPosition = rayPosition + rayDirection ; // get next density continue ; } // else we do color transformation outputColor = isoColor ; outputColor . rgb = outputColor . rgb * outputColor . a ; #ifdef SHADER // do shading #endif break ; } gl_FragColor . rgba = outputColor ; }
uniform sampler3D volume ; uniform float sampleRate ; uniform float isoValue ; uniform vec4 isoColor ; varying vec4 texCoord0 ; void main ( ) { floast steps = 1.0 / sampleRate ; vec4 outputColor = vec4 ( 0 ., 0 ., 0 ., 0 . ) ; float isoThr ; // get ray position and ray direction vec4 vPosition = gl_ModelViewMatrixInverse [ 3 ] ; vec3 rayPosition = texCoord0 . xyz ; vec3 vecDif = rayPosition - vPosition . xyz ; vec3 rayDirection = sampleRate * normalize ( vecDif ) ; // for all samples along the ray while ( steps ) { steps --; // get trilinear interpolated value from 3d texture float value = texture3D ( volume , rayPosition ) ; isoThr = value - isoValue ; // check if we get isosurface line if ( isoThr < 0 ) { // march to the next sample rayPosition = rayPosition + rayDirection ; // get next density continue ; } // else we do color transformation outputColor = isoColor ; outputColor . rgb = outputColor . rgb * outputColor . a ; #ifdef SHADER // do shading #endif break ; } gl_FragColor . rgba = outputColor ; }
uniform sampler3D volume ; uniform float sampleRate ; uniform float isoValue ; uniform vec4 isoColor ; varying vec4 texCoord0 ; void main ( ) { floast steps = 1.0 / sampleRate ; vec4 outputColor = vec4 ( 0 ., 0 ., 0 ., 0 . ) ; float isoThr ; // get ray position and ray direction vec4 vPosition = gl_ModelViewMatrixInverse [ 3 ] ; vec3 rayPosition = texCoord0 . xyz ; vec3 vecDif = rayPosition - vPosition . xyz ; vec3 rayDirection = sampleRate * normalize ( vecDif ) ; // for all samples along the ray while ( steps ) { steps --; // get trilinear interpolated value from 3d texture float value = texture3D ( volume , rayPosition ) ; isoThr = value - isoValue ; // check if we get isosurface line if ( isoThr < 0 ) { // march to the next sample rayPosition = rayPosition + rayDirection ; // get next density continue ; } // else we do color transformation outputColor = isoColor ; outputColor . rgb = outputColor . rgb * outputColor . a ; #ifdef SHADER // do shading #endif break ; } gl_FragColor . rgba = outputColor ; }
uniform sampler3D volume ; uniform float sampleRate ; uniform float isoValue ; uniform vec4 isoColor ; varying vec4 texCoord0 ; void main ( ) { floast steps = 1.0 / sampleRate ; vec4 outputColor = vec4 ( 0 ., 0 ., 0 ., 0 . ) ; float isoThr ; // get ray position and ray direction vec4 vPosition = gl_ModelViewMatrixInverse [ 3 ] ; vec3 rayPosition = texCoord0 . xyz ; vec3 vecDif = rayPosition - vPosition . xyz ; vec3 rayDirection = sampleRate * normalize ( vecDif ) ; // for all samples along the ray while ( steps ) { steps --; // get trilinear interpolated value from 3d texture float value = texture3D ( volume , rayPosition ) ; isoThr = value - isoValue ; // check if we get isosurface line if ( isoThr < 0 ) { // march to the next sample rayPosition = rayPosition + rayDirection ; // get next density continue ; } // else we do color transformation outputColor = isoColor ; outputColor . rgb = outputColor . rgb * outputColor . a ; #ifdef SHADER // do shading #endif break ; } gl_FragColor . rgba = outputColor ; }
uniform sampler3D volume ; uniform float sampleRate ; uniform float isoValue ; uniform vec4 isoColor ; varying vec4 texCoord0 ; void main ( ) { floast steps = 1.0 / sampleRate ; vec4 outputColor = vec4 ( 0 ., 0 ., 0 ., 0 . ) ; float isoThr ; // get ray position and ray direction vec4 vPosition = gl_ModelViewMatrixInverse [ 3 ] ; vec3 rayPosition = texCoord0 . xyz ; vec3 vecDif = rayPosition - vPosition . xyz ; vec3 rayDirection = sampleRate * normalize ( vecDif ) ; // for all samples along the ray while ( steps ) { steps --; // get trilinear interpolated value from 3d texture float value = texture3D ( volume , rayPosition ) ; isoThr = value - isoValue ; // check if we get isosurface line if ( isoThr < 0 ) { // march to the next sample rayPosition = rayPosition + rayDirection ; // get next density continue ; } // else we do color transformation outputColor = isoColor ; outputColor . rgb = outputColor . rgb * outputColor . a ; #ifdef SHADER // do shading #endif break ; } gl_FragColor . rgba = outputColor ; }
uniform sampler3D volume ; uniform float sampleRate ; uniform float isoValue ; uniform vec4 isoColor ; varying vec4 texCoord0 ; void main ( ) { floast steps = 1.0 / sampleRate ; vec4 outputColor = vec4 ( 0 ., 0 ., 0 ., 0 . ) ; float isoThr ; // get ray position and ray direction vec4 vPosition = gl_ModelViewMatrixInverse [ 3 ] ; vec3 rayPosition = texCoord0 . xyz ; vec3 vecDif = rayPosition - vPosition . xyz ; vec3 rayDirection = sampleRate * normalize ( vecDif ) ; // for all samples along the ray while ( steps ) { steps --; // get trilinear interpolated value from 3d texture float value = texture3D ( volume , rayPosition ) ; isoThr = value - isoValue ; // check if we get isosurface line if ( isoThr < 0 ) { // march to the next sample rayPosition = rayPosition + rayDirection ; // get next density continue ; } // else we do color transformation outputColor = isoColor ; outputColor . rgb = outputColor . rgb * outputColor . a ; #ifdef SHADER // do shading #endif break ; } gl_FragColor . rgba = outputColor ; }
uniform sampler3D volume ; uniform float sampleRate ; uniform float isoValue ; uniform vec4 isoColor ; varying vec4 texCoord0 ; void main ( ) { floast steps = 1.0 / sampleRate ; vec4 outputColor = vec4 ( 0 ., 0 ., 0 ., 0 . ) ; float isoThr ; // get ray position and ray direction vec4 vPosition = gl_ModelViewMatrixInverse [ 3 ] ; vec3 rayPosition = texCoord0 . xyz ; vec3 vecDif = rayPosition - vPosition . xyz ; vec3 rayDirection = sampleRate * normalize ( vecDif ) ; // for all samples along the ray while ( steps ) { steps --; // get trilinear interpolated value from 3d texture float value = texture3D ( volume , rayPosition ) ; isoThr = value - isoValue ; // check if we get isosurface line if ( isoThr < 0 ) { // march to the next sample rayPosition = rayPosition + rayDirection ; // get next density continue ; } // else we do color transformation outputColor = isoColor ; outputColor . rgb = outputColor . rgb * outputColor . a ; #ifdef SHADER // do shading #endif break ; } gl_FragColor . rgba = outputColor ; }
uniform sampler3D volume ; uniform float sampleRate ; uniform float isoValue ; uniform vec4 isoColor ; varying vec4 texCoord0 ; void main ( ) { floast steps = 1.0 / sampleRate ; vec4 outputColor = vec4 ( 0 ., 0 ., 0 ., 0 . ) ; float isoThr ; // get ray position and ray direction vec4 vPosition = gl_ModelViewMatrixInverse [ 3 ] ; vec3 rayPosition = texCoord0 . xyz ; vec3 vecDif = rayPosition - vPosition . xyz ; vec3 rayDirection = sampleRate * normalize ( vecDif ) ; // for all samples along the ray while ( steps ) { steps --; // get trilinear interpolated value from 3d texture float value = texture3D ( volume , rayPosition ) ; isoThr = value - isoValue ; // check if we get isosurface line if ( isoThr < 0 ) { // march to the next sample rayPosition = rayPosition + rayDirection ; // get next density continue ; } // else we do color transformation outputColor = isoColor ; outputColor . rgb = outputColor . rgb * outputColor . a ; #ifdef SHADER // do shading #endif break ; } gl_FragColor . rgba = outputColor ; }
uniform sampler3D volume ; uniform float sampleRate ; uniform float isoValue ; uniform vec4 isoColor ; varying vec4 texCoord0 ; void main ( ) { floast steps = 1.0 / sampleRate ; vec4 outputColor = vec4 ( 0 ., 0 ., 0 ., 0 . ) ; float isoThr ; // get ray position and ray direction vec4 vPosition = gl_ModelViewMatrixInverse [ 3 ] ; vec3 rayPosition = texCoord0 . xyz ; vec3 vecDif = rayPosition - vPosition . xyz ; vec3 rayDirection = sampleRate * normalize ( vecDif ) ; // for all samples along the ray while ( steps ) { steps --; // get trilinear interpolated value from 3d texture float value = texture3D ( volume , rayPosition ) ; isoThr = value - isoValue ; // check if we get isosurface line if ( isoThr < 0 ) { // march to the next sample rayPosition = rayPosition + rayDirection ; // get next density continue ; } // else we do color transformation outputColor = isoColor ; outputColor . rgb = outputColor . rgb * outputColor . a ; #ifdef SHADER // do shading #endif break ; } gl_FragColor . rgba = outputColor ; }
uniform sampler3D volume ; uniform float sampleRate ; uniform float isoValue ; uniform vec4 isoColor ; varying vec4 texCoord0 ; void main ( ) { floast steps = 1.0 / sampleRate ; vec4 outputColor = vec4 ( 0 ., 0 ., 0 ., 0 . ) ; float isoThr ; // get ray position and ray direction vec4 vPosition = gl_ModelViewMatrixInverse [ 3 ] ; vec3 rayPosition = texCoord0 . xyz ; vec3 vecDif = rayPosition - vPosition . xyz ; vec3 rayDirection = sampleRate * normalize ( vecDif ) ; // for all samples along the ray while ( steps ) { steps --; // get trilinear interpolated value from 3d texture float value = texture3D ( volume , rayPosition ) ; isoThr = value - isoValue ; // check if we get isosurface line if ( isoThr < 0 ) { // march to the next sample rayPosition = rayPosition + rayDirection ; // get next density continue ; } // else we do color transformation outputColor = isoColor ; outputColor . rgb = outputColor . rgb * outputColor . a ; #ifdef SHADER // do shading #endif break ; } gl_FragColor . rgba = outputColor ; }
uniform sampler3D volume ; uniform float sampleRate ; uniform float isoValue ; uniform vec4 isoColor ; varying vec4 texCoord0 ; void main ( ) { floast steps = 1.0 / sampleRate ; vec4 outputColor = vec4 ( 0 ., 0 ., 0 ., 0 . ) ; float isoThr ; // get ray position and ray direction vec4 vPosition = gl_ModelViewMatrixInverse [ 3 ] ; vec3 rayPosition = texCoord0 . xyz ; vec3 vecDif = rayPosition - vPosition . xyz ; vec3 rayDirection = sampleRate * normalize ( vecDif ) ; // for all samples along the ray while ( steps ) { steps --; // get trilinear interpolated value from 3d texture float value = texture3D ( volume , rayPosition ) ; isoThr = value - isoValue ; // check if we get isosurface line if ( isoThr < 0 ) { // march to the next sample rayPosition = rayPosition + rayDirection ; // get next density continue ; } // else we do color transformation outputColor = isoColor ; outputColor . rgb = outputColor . rgb * outputColor . a ; #ifdef SHADER // do shading #endif break ; } gl_FragColor . rgba = outputColor ; }
uniform sampler3D volume ; uniform float sampleRate ; uniform float isoValue ; uniform vec4 isoColor ; varying vec4 texCoord0 ; void main ( ) { floast steps = 1.0 / sampleRate ; vec4 outputColor = vec4 ( 0 ., 0 ., 0 ., 0 . ) ; float isoThr ; // get ray position and ray direction vec4 vPosition = gl_ModelViewMatrixInverse [ 3 ] ; vec3 rayPosition = texCoord0 . xyz ; vec3 vecDif = rayPosition - vPosition . xyz ; vec3 rayDirection = sampleRate * normalize ( vecDif ) ; // for all samples along the ray while ( steps ) { steps --; // get trilinear interpolated value from 3d texture float value = texture3D ( volume , rayPosition ) ; isoThr = value - isoValue ; // check if we get isosurface line if ( isoThr < 0 ) { // march to the next sample rayPosition = rayPosition + rayDirection ; // get next density continue ; } // else we do color transformation outputColor = isoColor ; outputColor . rgb = outputColor . rgb * outputColor . a ; #ifdef SHADER // do shading #endif break ; } gl_FragColor . rgba = outputColor ; }
Source: https://habr.com/ru/post/123632/
All Articles