Added support for discard fragment that don't generate an iso surface intersect
This commit is contained in:
parent
5c7a6a25a0
commit
cbaf9d639c
@ -117,7 +117,10 @@ char volume_iso_frag[] = "uniform sampler3D baseTexture;\n"
|
||||
"\n"
|
||||
" fragColor = vec4(lightScale, lightScale, lightScale, 1.0);\n"
|
||||
" \n"
|
||||
" break;\n"
|
||||
" if (fragColor.w>1.0) fragColor.w = 1.0; \n"
|
||||
" gl_FragColor = fragColor;\n"
|
||||
" \n"
|
||||
" return;\n"
|
||||
" }\n"
|
||||
" \n"
|
||||
" previousColor = color;\n"
|
||||
@ -127,7 +130,9 @@ char volume_iso_frag[] = "uniform sampler3D baseTexture;\n"
|
||||
" --num_iterations;\n"
|
||||
" }\n"
|
||||
"\n"
|
||||
" if (fragColor.w>1.0) fragColor.w = 1.0; \n"
|
||||
" gl_FragColor = fragColor;\n"
|
||||
" // we didn't find an intersection so just discard fragment\n"
|
||||
" discard;\n"
|
||||
"\n"
|
||||
"}\n"
|
||||
";\n"
|
||||
"\n";
|
||||
|
Loading…
Reference in New Issue
Block a user