Closed rizwan1239 closed 1 year ago
I haven't had a chance to look into your shader yet, but have you seen the SheetAnimator modifier? It can help point you in the right direction without needing a custom shader: https://github.com/EricFreeman/DynamicDecals/blob/master/Assets/Scripts/Modifiers/SheetAnimator.cs
I haven't had a chance to look into your shader yet, but have you seen the SheetAnimator modifier? It can help point you in the right direction without needing a custom shader: https://github.com/EricFreeman/DynamicDecals/blob/master/Assets/Scripts/Modifiers/SheetAnimator.cs
I missed this modifier in documentation. It works as I wanted. Cheers mate for quick reply!
Hi. I am using a custom shader with flipbook logic. Attaching the shader code. Takes sort of sprite sheet of multiple frames and plays it in a sequence according to values of columns, rows and speed. It works fine if I apply it to a cube directly. When I create a decal from it, it actually renders but the whole sprite sheet is being rendered instead of per frame. I verified shader properties on runtime but those properties don't seem to make an effect.
Shader Code
This is what it looks when directly applied on a cube. https://github.com/EricFreeman/DynamicDecals/assets/33382155/cab3169a-8065-4131-b809-0fcff2d3e259
This is what it looks like when rendered through decal even though those flipbook parameters are being set on runtime.