Opened 10 years ago
Closed 10 years ago
#73 closed defect (fixed)
Selection outline shifted, zoom dependent
Reported by: | Tom Goddard | Owned by: | Tom Goddard |
---|---|---|---|
Priority: | minor | Milestone: | |
Component: | Graphics | Version: | |
Keywords: | Cc: | gregc@… | |
Blocked By: | Blocking: | ||
Notify when closed: | Platform: | all | |
Project: | chimera |
Description
The selection outline on an atom doesn't exactly match the boundary of what is selected. It only happens at certain intermediate zoom levels, returning to a correct match when zoomed out or zoomed in. I've attached an image showing this with 1gcn.
Seems like a depth bias effect because the outline is shifted only where the selected atom intersects another atom. The outline edge that does not intersect another atom always remains correct.
Reported by Greg Couch.
Change History (2)
comment:1 by , 10 years ago
comment:2 by , 10 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Kind of fixed. Will likely require further study to understand the problem.
Note:
See TracTickets
for help on using tickets.
The outline drawing copies the depth buffer for the full rendered scene to another framebuffer where it renders just the selected part with a LEQUAL depth test. But it does a glDepthRange(0, 0.99999) to avoid z-fighting. I'm not sure why there would be z-fighting if the two framebuffers have identical depth buffer formats and the rendered selection is exactly a part of what was rendered in the full scene. It should produce equal depths. But apparently z-fighting does occur, maybe because the depth buffer format is different.
Making depth range 0.999999 (one extra 9) fixes the 1gcn case. Making it 0.9999 (removing one 9) makes the outline shift much worse. Making the depth range 1 (the default) causes z-fighting and a selected atom just has speckles of green outline all over with no edge.
It would be good to understand why the z-fighting occurs. But for now I will change the code to use depth range 0.999999.