-
-
Notifications
You must be signed in to change notification settings - Fork 10.4k
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
Ripple effect Clipping/Overdrawing/Adavced poly to avoid overdraw. #3997
Comments
I don't have an easy answer to this, when you involve transparency and rounded shapes things tend to become tricky. Answer (3) seemingly is the right solution. Actually @ShironekoBen did implement arbitrary clipping as part of the experimental shadow branch (#1329). It does work but it is rather complicated code and that complexity was one of the reason I was hesitant to merge it (the other and main reason being remaining backend work which is also in the work, see #3761, when that's done we will come back to the shadow stuff). Your request is interesting because it shows a different use of that clipping function and as thus gives us another reason to merge that clipping code. See |
I visited the link you shared and found the shared function, but it was not very good and it was not doing my job well enough so I was able to make it what I wanted by doing a few changes on this function and I wanted to share it with you.
The float values I use here are not completely perfect, but they draw more efficiently than the shared PathArcToFast function. I leave a visual of the results below |
I dont know how you even managed to make this run, as it trigger a assert due to a_min being bigger than a_max. Anyways it still does not address the anti alias issue and only helps rounding(on the shadows branch as master already has good rounding with the new PathArcToFast). |
See #4030 |
Oops, sadly still does not fix anti-aliasing not working only makes the rounding better on the old version[Of Dear ImGui] as the new version[Of Dear ImGui] looks just fine. |
Version/Branch of Dear ImGui:
Version: Current
Branch: master
Back-end/Renderer/Compiler/OS
Back-ends: imgui_impl_directx9.cpp + imgui_impl_win32.cpp (or specify if using a custom engine/back-end)
Compiler: msvc (if the question is related to building or platform specific features)
Operating System: window 10
My Issue/Question:
Hello, i am trying to create a ripple effect in Dear ImGui.
Now the issue is that i cannot avoid the circle drawing over the corners of the rounded rect, i have solved this using the inverted rect method mention here.
The issue with this is that it does not anti-alias, it does not do this due to it cutting off all alpha is there a alternative to this?
I cannot see how this problem can be solved with out allowing the circle to also fill that area, i do thought have a few suggestions for a alternative/fix
Is any of this a good idea or should i go back to the drawing board?
Screenshots/Video
This is the thing i want todo
Standalone, minimal, complete and verifiable example: (see #2261)
EDIT:
Not very good example in reality i wont be using a border else i could just draw it above.
The text was updated successfully, but these errors were encountered: