Volumetric Card Shader In Unity

Inspiration

While browsing Pinterest, I stumbled upon an article on 80.lv, Creating Volumetric Tarot Cards with Layered Material. Oleg’s approach to layered materials fascinated me, and I instantly wanted to bring a similar effect to Unity, where I feel confident working with Shader Graph. I searched through YouTube tutorials, Unity Asset Store assets, and various forums, but nothing quite captured the exact vision I had in mind.


Project Breakdown


Image made with AI

My first goal was to replicate the technique of reading multiple images from a single texture, as Oleg did in his work. This approach not only optimizes performance by reducing texture calls but also simplifies asset management by storing multiple sprites in a single texture file.

By setting up my shader to read different layers from one texture, I ensured that I could achieve a similar depth effect while minimizing the project’s memory footprint.

The heart of the shader lies in its scaling and offset calculations for each layer. Developing an algorithm to scale each layer around its center was the most challenging aspect. Initial attempts led to offset issues, with each layer scaling outward unevenly. After trial and error, I devised an approach to dynamically calculate and adjust offsets and scale so that each layer maintains its position relative to the center, creating the illusion of depth.

With the layering system in place, I shifted focus to animating elements of the card. I implemented controls that allow designers to adjust specific patterns and glows within the card, similar to Oleg’s interactive adjustments. By providing options for animated glows, designers can easily customize effects and create variations on each card, giving it a unique, enchanted feel.

Check my other projects!

Like what you see? there’s more