Allow Shaders / Materials for Decals #4636
Replies: 2 comments 3 replies
-
I haven't yet used decals, but I imagine some cases can be handled by rendering effects into ViewportTexture. From technical viewpoint, how would this shader work? Ie. what goes in, what goes out? Cone shaped decals would definitely be cool also for projectors. |
Beta Was this translation helpful? Give feedback.
-
The decal implementation in 4.0.alpha is fast because it never performs material/shader changes. If this was changed to allow for custom materials/shaders, it would no longer be quite as fast. If you need custom shaders, I suggest using PlaneMesh with a transparent material applied to it instead of using a Decal node. You can use a reverse proximity fade trick to fade the decal away when it gets far away from a solid surface.
This can be achieved using a RayCast node that adjusts the decal's X and Z extents based on the RayCast's hit position relative to the dynamic object's origin. |
Beta Was this translation helpful? Give feedback.
-
Changing how the Decal blends with the environment in a custom way is incredibly helpful and I'll offer some examples as to where this would be useful:
Stylized lights and shadows that adhere to a specific color palette and falloff type (this can be integrated as additional parameters)
Procedural effects akin to particles (think swirling shadows, blood, water, dust) (I'm not sure how else this could be exposed to particles
Currently the only way to make this happen is using flipbooks and that's pretty limited.
I don't use ORM because I'm making a stylized game but I will note that even the ORM Material section just shows you options for Textures containing ORM information rather than ORM 3D Materials which can use custom shaders.
Edit: Adjusting Decal Scale based on projection distance would be great for spot shadows
Beta Was this translation helpful? Give feedback.
All reactions