Topic was automatically imported from the old Question2Answer platform.
Asked By
purple_mage
Hello. I began to play around with shader =P . Do you know if i can apply a shader over another shader . I mix them but if i want to do somthing like frozing my ennemie or things like that . How to apply shader without losing or adding code in the preexisting shader ! I Thanks !
Shaders can be applied in multiple stages if I’m not mistaken.
A mesh (resource) can have a shader, a material can define a next pass material, a mesh instance3D (node) can have a surface material override, a geometry instance3D (node) can have a material override and a material overlay (probably what you want).
thanks ill take a look
purple_mage | 2023-03-29 13:24
I found how ty !!!
var materialVar = preload("res://Buddy/MaterialSaved.tres")
whatevermesh.set_surface_override_material( 0, materialVar)
easy !
purple_mage | 2023-03-29 14:05
hmm do you know if its possible to remove the material after ?
how do i procced . I save the material before replacing it ?
and when im done with the override i put the one before on it ?