View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0006214 | The Dark Mod | Graphics | public | 03.01.2023 13:00 | 07.01.2023 11:30 |
Reporter | stgatilov | Assigned To | stgatilov | ||
Priority | normal | Severity | normal | Reproducibility | sometimes |
Status | assigned | Resolution | open | ||
Product Version | TDM 2.11 | ||||
Target Version | TDM 2.12 | ||||
Summary | 0006214: Cleaning the scissors mess | ||||
Description | This started as a bug for low renderscale. When we convert renderscale from vidsize (where it is computed) to actual FBO size, we round in non-conservative way. As the result, we can get some thin gaps between neighboring surfaces in a perfectly solid geometry. This usually happens in axis-aligned brush geometry where visportal splits the geometry into different surfaces. However, I think it's time to refactor the whole scissor thing to make it better: 1) Try to make idScreenRect non-inclusive on right side, aka [L..R) --- not sure that would be easy, but such representation is much better. 2) When idScreenRect is computed, it is rounded down then expanded by 1 pixels in all directions. Instead of expanding, just round properly (maybe with tolerance, but no need to expand on lower side). 3) Make a single function to convert from vidsize rectangle to currentFBO rectangle, instead of two functions GL_ScissorVidSize, GL_ViewportVidSize and third function CalcScissorParam in DepthStage. Make sure it is conservative. 4) Do the same for "Relative" case, and make sure it is conservative too. 5) Make sure r_glScissor is respected everywhere, put moving it into scissor wrappers and getting rid of direct scissor API calls. 6) Wrap scissor state into some kind of auto-restore helper to avoid state leaks (this includes both on/off and the rectangle itself). | ||||
Steps To Reproduce | It also happens on "Down and Out on Newford Road". Execute: setviewpos -118.38 -169.18 200.25 6.5 33.5 0.0 Make sure to set RenderScale like 0.14. | ||||
Tags | No tags attached. | ||||
The original bug happened on Frost_Salamander's WIP map (codename FSX). I have attached screenshots showing 1-pixel holes at the window edges. The window contains a visportal, matching the edges exactly where the holes are. The holes are bright-blue, because that's the color of skybox. This issue was fixed only when I fixed rounding in CalcScissorParam in DepthStage (yeah, this shader-implemented scissor was quite hard to find). The fix is in svn rev 10231. |
|
r10231 made the compass disappear, at least for me. | |
Fixed in svn rev 10236. | |
Date Modified | Username | Field | Change |
---|---|---|---|
03.01.2023 13:00 | stgatilov | New Issue | |
03.01.2023 13:00 | stgatilov | Status | new => assigned |
03.01.2023 13:00 | stgatilov | Assigned To | => stgatilov |
03.01.2023 13:08 | stgatilov | Note Added: 0015685 | |
03.01.2023 13:08 | stgatilov | File Added: test_fsx (2023-01-03 14-06-07) (2144.25 3408.25 116.25).jpg | |
03.01.2023 13:08 | stgatilov | File Added: test_fsx (2023-01-03 14-05-32) (2144 3440 116.25).jpg | |
03.01.2023 13:08 | stgatilov | File Added: test_fsx (2023-01-03 14-05-44) (2153.58 3439.7 116.25).jpg | |
03.01.2023 13:09 | stgatilov | Note Edited: 0015685 | |
03.01.2023 13:11 | stgatilov | Steps to Reproduce Updated | |
07.01.2023 02:56 | Daft Mugi | Note Added: 0015718 | |
07.01.2023 11:30 | stgatilov | Note Added: 0015721 |