View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0004253 | Slicer4 | Core: Rendering | public | 2016-09-10 16:38 | 2016-09-27 10:33 |
Reporter | lassoan | Assigned To | jcfr | ||
Priority | normal | Severity | major | Reproducibility | always |
Status | resolved | Resolution | fixed | ||
Product Version | Slicer 4.6.0 | ||||
Target Version | Fixed in Version | ||||
Summary | 0004253: VTK rendering corrupted with VTK OpenGL2 rendering backend | ||||
Description | When VTK OpenGL2 rendering backend is used, image slices appear in 3D viewer incorrectly. A. Depth-peeling disabled Tested on a Surface book with NVidia GPU. Behavior is the same if used with Intel and NVidia GPU. B. Depth-peeling enabled Only a part of the slice is visible, some colored noise appears in the viewer. Tested on a Surface book with NVidia GPU. Behavior is only reproducible with with Intel GPU. Rendering is correct if the application is set to use NVidia GPU. | ||||
Steps To Reproduce |
| ||||
Tags | No tags attached. | ||||
RenderingCorruptionOpenGL2.mp4 (3,109,533 bytes) |
|
Tested on a desktop PC with NVidia card: rendering is corrupted with depth-peeling disabled (A), rendering is correct with depth-peeling enabled (B). |
|
If texture interpolation is turned off, then display is correct. for snName in ['Red Volume Slice', 'Green Volume Slice', 'Yellow Volume Slice']: |
|
I took a look at scenario A. In the OpenGL2 backend the actors for the slices are not rendering into the depth buffer (i.e. glDepthMask(GL_FALSE)) because GetIsOpaque() returns false; see https://github.com/Kitware/VTK/blob/94dfcdac64c2e987155b216d39e6049fa1206e4b/Rendering/OpenGL2/vtkOpenGLActor.cxx#L59 In the OpenGL backend this code checked whether the actor's property's opacity == 1.0. As a test, in the debugger, it looks like forcing those actors to be opaque (vtkActor::ForceOpaque) fixes the rendering. Without verifying, the difference seen when disabling texture interpolation can probably be explained by the checks in https://github.com/Kitware/VTK/blob/94dfcdac64c2e987155b216d39e6049fa1206e4b/Rendering/Core/vtkTexture.cxx#L260 |
|
For reference, this was fixed in https://github.com/Slicer/Slicer/pull/586 / http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&revision=25394 |
|
I've tested this and it works well on NVidia and Intel GPUs, too. Thank you! |
|
Date Modified | Username | Field | Change |
---|---|---|---|
2016-09-10 16:38 | lassoan | New Issue | |
2016-09-10 16:38 | lassoan | Status | new => assigned |
2016-09-10 16:38 | lassoan | Assigned To | => jcfr |
2016-09-10 16:40 | lassoan | File Added: DepthPeelingOff2.png | |
2016-09-10 16:40 | lassoan | File Added: DepthPeelingOn2.png | |
2016-09-10 16:41 | lassoan | File Added: RenderingCorruptionOpenGL2.mp4 | |
2016-09-10 16:52 | lassoan | Note Added: 0014086 | |
2016-09-10 19:04 | lassoan | Note Added: 0014087 | |
2016-09-10 19:12 | lassoan | Note Edited: 0014087 | View Revisions |
2016-09-20 18:35 | msmolens | Note Added: 0014107 | |
2016-09-27 09:44 | msmolens | Note Added: 0014132 | |
2016-09-27 09:44 | msmolens | Status | assigned => resolved |
2016-09-27 09:44 | msmolens | Resolution | open => fixed |
2016-09-27 10:33 | lassoan | Note Added: 0014133 |