Hi, I can't seem to apply a shader material to tabs. Neither applying it on the TabContainer node or the TabBar node works. It works for all other GIU nodes, it even works for other parts of the TabContainer node, such as the panel. It also works fine on TabContainer in Godot3. Am I missing something or is it possibly a bug? Is it the same for anyone else?
Tabs don't work with sharers
What's the runtime remote scene tree like?
- Edited
Megalomaniak Well I tried it in a new project as well, and this is all that's in it:
This time I simply made the shader material this :
`shader_type canvas_item;
void fragment() {
COLOR = vec4(1,1,1,1);
}`
But still only the panel becomes white.
Have you tried attaching the shader material via code to those TabBars?
- Edited
Megalomaniak Now I have, but it's still the same.
extends TabContainer
@onready var shader = preload("res://shaders/shader.gdshader")
func _ready() -> void:
$TabBar.material = ShaderMaterial.new()
$TabBar.material.shader = shader
self.material = ShaderMaterial.new()
self.material.shader = shader
Hmm, I don't see any open bugs on the repo but maybe it should be reported since I can't think of any reason why this shouldn't work one way or another...
Meanwhile, you should consider if what you want to do really can't be done via a theme instead?
Megalomaniak Thanks, i'll open an issue then!