Updated iso and mip shaders from OpenSceneGraph-Data.
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14358 16af8721-9629-0410-8352-f15c8da7e697
This commit is contained in:
@@ -3,7 +3,7 @@ char volume_accumulateSamples_iso_frag[] = "#version 110\n"
|
||||
"uniform sampler3D volumeTexture;\n"
|
||||
"\n"
|
||||
"uniform float IsoSurfaceValue;\n"
|
||||
"\n"
|
||||
"uniform float TransparencyValue;\n"
|
||||
"varying vec3 lightDirection;\n"
|
||||
"\n"
|
||||
"vec4 accumulateSamples(vec4 fragColor, vec3 ts, vec3 te, vec3 dt, float scale, float cutoff, int num_iterations)\n"
|
||||
@@ -29,7 +29,7 @@ char volume_accumulateSamples_iso_frag[] = "#version 110\n"
|
||||
" float r = (targetValue-color.a)/(previousColor.a-color.a);\n"
|
||||
" texcoord = texcoord - r*dt;\n"
|
||||
"\n"
|
||||
" color.r = vec4(1.0, 1.0, 1.0, 1.0);\n"
|
||||
" color.rgba = vec4(1.0, 1.0, 1.0, 1.0);\n"
|
||||
"\n"
|
||||
" float px = texture3D( volumeTexture, texcoord + deltaX).a;\n"
|
||||
" float py = texture3D( volumeTexture, texcoord + deltaY).a;\n"
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
char volume_accumulateSamples_mip_frag[] = "#version 110\n"
|
||||
"\n"
|
||||
"uniform sampler3D volumeTexture;\n"
|
||||
"uniform float TransparencyValue;\n"
|
||||
"uniform float AlphaFuncValue;\n"
|
||||
"\n"
|
||||
"vec4 accumulateSamples(vec4 fragColor, vec3 ts, vec3 te, vec3 dt, float scale, float cutoff, int num_iterations)\n"
|
||||
"{\n"
|
||||
@@ -10,7 +12,7 @@ char volume_accumulateSamples_mip_frag[] = "#version 110\n"
|
||||
" {\n"
|
||||
" vec4 color = texture3D( volumeTexture, texcoord);\n"
|
||||
"\n"
|
||||
" if (colorcolor.a>AlphaFuncValue && color.a>fragColor.a)\n"
|
||||
" if (color.a>AlphaFuncValue && color.a>fragColor.a)\n"
|
||||
" {\n"
|
||||
" fragColor = color;\n"
|
||||
" }\n"
|
||||
@@ -20,6 +22,8 @@ char volume_accumulateSamples_mip_frag[] = "#version 110\n"
|
||||
" --num_iterations;\n"
|
||||
" }\n"
|
||||
"\n"
|
||||
" fragColor.a *= TransparencyValue;\n"
|
||||
"\n"
|
||||
" return fragColor;\n"
|
||||
"}\n"
|
||||
"\n";
|
||||
|
||||
Reference in New Issue
Block a user