Godot Version
4.4.1
Question
I’m trying to get Material Override to display a shadow the same way Material Overlay does. This is specifically for a 2d texture as a Sprite3D.
Project with Material Override, and no shadows: GitHub - michael-conrad/GamedevTvActionAdventure2.5d_RPG at 5c1a1f65610d2a378e66f4b6407980865a3d01db
Scenes: Player and Enemy, with shader applied to …AnimatedSprite3D
Switching to Material Overlay and the shadows start working?
Is this just not possible with Material Override?
-Mike
For the project I’m working with.
I think it is working.
Had to rotate the sprite-3d 180 degrees, so that the overlay shows up in front and not in the back.
Switched to MaterialOverlay
set FLAGS: double-sided = false
set FLAGS: alpha cut = Opaque Pre-Pass
set GEOMETRY: Material Overlay with shader
set GEOMETRY: Cast Shadow = Double-Sided
Invert the Flip() true/false values to match the new Sprite3D rotation.
Makes me think the camera is pointed 180 degrees in the wrong direction.
I now am getting shadows as well as the shader working in my test project.
REF: GitHub - michael-conrad/GamedevTvActionAdventure2.5d_RPG at fab88f31cebf6f58894347c703d95cb757ef0410