#Shader doesn't blur nodes in actual game

1 messages · Page 1 of 1 (latest)

dark plume
#

I've got a really simple blur shader on a color rect, and it works, but when I move it to the actual game, it doesn't seem to blur anything and I don't know why

#

when I play the game, it doesn't blur though

little pier
#

could it be that the pause menu is a child of a node2d?
in that case the anchor settings don't really work and the blur wouldn't affect the whole screen.

dark plume
#

I'm not sure, because when I set the node as a child of the node in the game, it still doesn't want to work

#

I've also tried rearranging all the nodes in some different ways to see if that would work but it wouldnt

#

I've just noticed that the color rect will show in the scene with the pause menu

#

but not in the main scene for some reason

#

its just invisible in there

#

well, its working, its just really small I guess

#

I'm not very good with control nodes, I might see if I can find a tutorial or something a bit later

little pier
# dark plume I'm not very good with control nodes, I might see if I can find a tutorial or so...

the important thing in this case is that conrol node anchoring only works properly if the highest parent of your control hierarchy isn't a node2d. your main scene is a node2d and your pause menu is a direct child of that. CanvasItems, the base class of control and node2d is the reason they share their positional system, as in a child node will inherit the position of its parent. if this position doesn't come from another control node, it prevents the anchoring from working. just adding a "neutral" type of node inbetween will break this inheritance and will allow the control to work properly.
This is something that usually only gets partly explained in tutorials, as in they just say that you should make your ui a child of a CanvasLayer, which contrary to its name isn't a CanvasItem.

dark plume
#

ahhh

#

okay