-
-
Notifications
You must be signed in to change notification settings - Fork 21.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
Fix GLES3 changing 2D shadow atlas size is broken #80151
Conversation
it's already clamping the texture size to the max_texture_size allowed so this is just a friendly warning when you set a larger size |
there are still 3 issues, |
Ah, I missed this I assumed it was doing a reject of the command. Clamping makes sense. However it does look like the check for no change is made above this, so could be moved below the clamping, maybe we could fix this at same time. |
62c32d3
to
5d8734f
Compare
please don't approve since this is not finished, i will try to track why it doesn't respect the new size on running the scene. |
If you are still working on it, just convert to draft, there is a (hard to see 😀 ) button on github on the top right of the page in the reviewers section. Then reviewers know to hold off, and it also won't be merged by accident. Then click |
this was helpful, now we need to put this line somewhere when the game starts to load settings from project settings.
it already exists in the editor _load_from_settings() so where to add it ? in the ready() of the game in |
@lawnjelly have a look on this it seems like the shadow_atlas gets resized on gles3 then the shadow polygons are drawn over the small texture and rendered in high resolution on screen |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work! I just left one suggestion, after fixing that one thing this should be ready to merge
@clayjohn Thank you, please feel free to review and edit the code since I have no experience with opengl, I also have found another issue on this file. the default polygon color in opengl is black, and here it doesn't update the polygon color if it's white, means drawing with white color will not update the polygon color in opengl but any other color will do, this issue only appears when building without Vulkan and trying to draw any polygon with white color, like a line or a rect inside the draw function will appear black. can i fix this one too ? it happens like, the first draw call is black when the color is white, the second draw call will be red when the color is red and will fix the first call because it will update the polygon color after this, also another draw call in white color may fix it as i remember since the color array will have more than one color and will not use those fixed lines as i understand, and also will fix the polygon color, so using only one draw_rect with white color will appear black if you didn't draw any other polygons in the same frame. is there's a better way to set the default polygon color to white when the gles3 renderer starts ? like running this line once when it starts |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good now! Thanks for working on this.
As a note for the future, we try really hard to keep separate changes in their own PRs. So, in the future, please open a new PR when you want to fix a separate bug. In this case I won't make you open a new PR because it's literally a two line change. But even for small changes like this it really is better to open a separate PR.
Got it, Thank you ^^ Anyway, it's ok to merge at this point since it can tell that we are using white as the default polygon color. |
You can keep them. I prefer being explicit about initialization anyway. |
Thanks! |
Fixes #80148
Fixes #80186
Fixes #80396