Fixed iso surface shaders

This commit is contained in:
Robert Osfield
2014-04-04 11:25:51 +00:00
parent d773d358c4
commit 67b4d5412b
2 changed files with 5 additions and 9 deletions

View File

@@ -29,14 +29,8 @@ char volume_accumulateSamples_iso_frag[] = "#version 110\n"
" float r = (targetValue-color.a)/(previousColor.a-color.a);\n"
" texcoord = texcoord - r*dt;\n"
"\n"
"#if 0\n"
" color = texture3D( volumeTexture, texcoord);\n"
"#else\n"
" color.r = 1.0;\n"
" color.g = 1.0;\n"
" color.b = 1.0;\n"
" color.a = 1.0;\n"
"#endif\n"
" color.r = 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"
" float pz = texture3D( volumeTexture, texcoord + deltaZ).a;\n"
@@ -55,6 +49,8 @@ char volume_accumulateSamples_iso_frag[] = "#version 110\n"
" color.g *= lightScale;\n"
" color.b *= lightScale;\n"
" }\n"
"\n"
" color.a = clamp(color.a*TransparencyValue, 0.0, 1.0);\n"
" return color;\n"
" }\n"
"\n"

View File

@@ -53,7 +53,7 @@ char volume_accumulateSamples_iso_tf_frag[] = "#version 110\n"
" color.g *= lightScale;\n"
" color.b *= lightScale;\n"
" }\n"
" fragColor.a = clamp(fragColor.a*Transparency, 0.0, 1.0);\n"
" fragColor.a = clamp(fragColor.a*TransparencyValue, 0.0, 1.0);\n"
" return color;\n"
" }\n"
"\n"