-
-
Notifications
You must be signed in to change notification settings - Fork 410
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix #3320: Incorrect colors for 3D draws #3321
Conversation
Although I assume it works, the origin of these coefficients isn't clear for me. Can you elaborate on how they were found? |
The bug only appears for 3D lines, not for 3D material lines, because the code was already there. The solution comes from the code of 3D material lines. |
I see now, you just copied the behaviour from |
This is a very good question, because if we draw as a postGUI, then this is not necessary. This is probably caused by a bug / behavior of DirectX. |
After a little research I have found that the problem is indeed comes from the color correction pass (as I pointed out in #3320). This pass isn't fixed and it changes the colors every frame. So you can see that the division by 2 doesn't fix that, but only masks the problem. Moreovere, there is no constant that can fix it. That means that 3D material lines still experience the problem. I think that the division should be removed from CMaterialLine3DBatcher as it makes colors inconsistent with other dx functuin and makes it difficult to correct colors using getColorFilter function. Unfortunately this PR also doesn't fix the issue. |
I removed the division from both batchers. |
Finally no more getColorFilter to fix the dx rendering? Nice. |
This patch only removes divide by two from the line batcher, so it doesn't provide a real solution to the problem, it can be used uniformly and correctly with getColorFilter, but a future patch may include a real solution to the problem. |
Fixes #3320 (an old bug caused by an incomplete, unfinished piece of code)