This is with:
SetRepresentationToSurface()
SetEdgeVisibility(true)
Opacity of less than 1.
This occurs both with and without depth peeling.
The triangle edge in the middle is only barely visible, and only with transparency turned on. I did diff the relevant sections of vtkOpenGLPolyDataMapper.cxx, and there seem to have been many MANY changes in this area. Does anybody have any insight?
Hmm. This is not the first time seeing that happen. Can you try to increase the line width? Default is 1. The surface with edges algorithm used in vtkOpenGLPolyDataMapper works best with line widths somewhere between 2 and 5.
Unfortunately it is very important that I continue to support arbitrary line widths, including a thickness of 1.
I’m guessing you are talking about some of the work done in vtkOpenGLPolyDataMapper::RenderPieceDraw ? It looks like there have been a number of changes in that function related to the ways that lines are drawn, I’m picking it apart to see if any of it could be involved.
This happens only at specific camera viewpoints, right? I assumed it’s just a quad. Here is what I tried to emulate your issue. Interestingly enough, changing the edge color to something that’s not close to the surface color removes that diagonal line. ex: edge colored red. With a width of 1, I can still see some traces of red on the diagonal.
The related code is in vtkPolyDataEdgesGS.glsl and vtkOpenGLPolyDataMapper::ReplaceShaderEdges, bisecting there can help you figure it out. I’m almost sure this is a precision issue when the shader computes color using emix for the invisible edges.
Wow, thanks for making my MRE for me! Tomorrow morning I will see if I can find anything in the file you specified, and in either case I will file the bug report.
Oh, and to answer your question, yes I only see it from oblique angles. It tends to go away when the surface is viewed from acute angles.
Cool, I will review the WebGPU shader as well. Being honest, I had always wondered how this effect was done in VTK, happy to poke around and find out. That is a nifty looking algo.