Skip to content
Snippets Groups Projects
Commit ce8fd4dc authored by Aashish Chaudhary's avatar Aashish Chaudhary
Browse files

Do not write depth value if we need to skip a fragment

parent f1b69920
No related branches found
No related tags found
No related merge requests found
......@@ -46,7 +46,6 @@ int TestGPURayCastRenderDepthToImage2(int argc, char *argv[])
volumeMapper->RenderToImageOn();
vtkNew<vtkColorTransferFunction> colorFunction;
colorFunction->AddRGBPoint(900.0, 198/255.0, 134/255.0, 66/255.0);
colorFunction->AddRGBPoint(37.35310363769531, 0.231373, 0.298039, 0.752941);
colorFunction->AddRGBPoint(157.0909652709961, 0.865003, 0.865003, 0.865003);
colorFunction->AddRGBPoint(276.8288269042969, 0.705882, 0.0156863, 0.14902);
......@@ -59,7 +58,7 @@ int TestGPURayCastRenderDepthToImage2(int argc, char *argv[])
vtkNew<vtkPiecewiseFunction> scalarOpacity;
scalarOpacity->RemoveAllPoints();
scalarOpacity->AddPoint(center, 0.01);
scalarOpacity->AddPoint(center, 0.0);
scalarOpacity->AddPoint(dataRange[1], 0.4);
vtkNew<vtkVolumeProperty> volumeProperty;
......
56f8c9f08e341337b2a8b4c22ded5817
6bc09829bf703f9687728384102e108a
06cca1b201823f9aebfa104cfff16abe
......@@ -1080,7 +1080,7 @@ namespace vtkvolume
\n {\
\n for (int i = 0; i < in_noOfComponents; ++i)\
\n {\
\n tmp.x += color[i].x * color[i].w * in_componentWeight[i] ;\
\n tmp.x += color[i].x * color[i].w * in_componentWeight[i];\
\n tmp.y += color[i].y * color[i].w * in_componentWeight[i];\
\n tmp.z += color[i].z * color[i].w * in_componentWeight[i];\
\n tmp.w += ((color[i].w * color[i].w)/totalAlpha);\
......@@ -1113,7 +1113,7 @@ namespace vtkvolume
\n // alpha from the previous steps. Next, this alpha is\
\n // multiplied with the current sample colour\
\n // and accumulated to the composited colour. The alpha\
\n // value from\ the previous steps is then accumulated\
\n // value from the previous steps is then accumulated\
\n // to the composited colour alpha.\
\n g_srcColor.rgb *= g_srcColor.a;\
\n g_fragColor = (1.0f - g_fragColor.a) * g_srcColor + g_fragColor;"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment