dreadpon/godot_spatial_gardener

[FEATURE REQUEST] Allow toggling shadow casting per entry

Flavelius opened this issue · 1 comments

Describe the problem you're trying to solve in your project
It's sometimes advisable to disable shadow casting when placing a lot of small grass instances that are too small to cast meaningful shadows. It's currently not possible to disable that on a per entry basis.

Describe a feature you consider and how it will help you
It would be helpful to have an additional toggle to change the shadow casting mode in the property panel for each entry.

Describe alternatives you've considered
One possible alternative is to create a custom shader-material which has shadow casting disabled as render mode. The problem is that this then applies to all targets using this material, meaning it would require creating extra custom materials for imported scenes just to have them also be renderable with shadows disabled. And it's more steps involved when later deciding to scale up the painted grass instances and wanting them to then cast shadows again.

Describe how you imagine it would work. With code, pseudo-code, diagram or a drawing
The toggle would simply copy its state to the resulting multimesh's https://docs.godotengine.org/en/stable/classes/class_geometryinstance.html#class-geometryinstance-property-cast-shadow property

Edited and merged your suggestion with #21
Thanks!