Various fixes and documentation for CanvasGroup#70003
Conversation
|
@akien-mga Force pushed with your suggested changes! |
Properly apply custom materials with CanvasGroups in the GLES3 backend Properly blur backbuffer when using a partial rect in forward_plus and gl_compatibility renderers Properly set fit_margin when clear_margin is set Fix shader error during backbuffer clear in mobile renderer
944d6e6 to
bdd4001
Compare
|
Thanks! |
|
Hi @clayjohn, the CanvasGroup docs state to use this: But what exactly is this? Why is it exposed to the user? Why not just automate it behind the scenes, bundle it up so that we can simply use The most powerful use of CanvasGroup is being able to apply a shader to 100 nodes which have their own individual shaders and materials ( |
CanvasGroup does automate this behind the scenes. As the note I added to the docs says, this code is only if you choose to override the built in behaviour and implement your own custom shader. For most users CanvasGroup just works automagically. But power users have the option of completely overriding the built in behaviour if they want. I think it is important for documentation to document both the advanced use-cases of a feature and the ordinary use case. Finally, CanvasGrouping can be used by ordinary nodes like Sprite2D. So we can't override the regular
I'm not sure what you mean. |
Issue 1: Unclear what setting a custom material does
Adds docs to the CanvasGroup API doc to warn users that they become responsible for reading from
SCREEN_TEXTUREif they apply a custom shader.Fixes: #69885
Fixes: #51204
Fixes: #54213
Issue 2: Custom material not applied in the GLES3 renderer
Reported here: #69885 (comment)
When users add a custom material to a CanvasGroup it should be used.
This appears to be a copy-paste error from #67043
Issue 3: Enable Mipmaps not working on Mobile
Fixes: #67096
This was an issue with the copy to framebuffer shader including textures even in the
SET_COLORmode.Issue 4: Mipmaps are broken in forward_plus renderer
This also affected mipmaps from BackBufferCopy nodes using the rect copy (rather than fullscreen)
The problem here was that the gaussian blur didn't take the rect position into account
Issue 5: Mipmaps are broken in gl_compatibility renderer
This was a mistake in the blitFramebuffer code, the third and fourth parameters are not width and height, they are X1 and Y1. So we need to add the position to the size.