Mise à niveau vers Pro

80.LV
Custom Stylized 2.5D Lighting Shader For Objects In Unity
As Alexey Testov aka Biuzer explained, the light here is just a sprite, and the shader determines whether it's in front or behind the object, adjusting the brightness accordingly. The shadow is also a sprite, and the tree is flat too.As for performance, Alexey isn't able to provide much detail just yet, as he only recently started learning shaders and is just beginning to focus on optimization. He also mentioned that this is being developed for his game, which is actually 3D but designed to give the appearance of 2.5D. The camera has a fixed rotation angle and a very narrow field of view, and all objects are flat sprites.The ground and objects use separate shaders, but they are carefully adjusted to ensure a seamless visual transition in color. During the day, real shadows are cast by the directional light, while fake shadows are used only for point lights.Biuzer"Each light source has a technical sprite – a radial gradient split into two colors. The top part is green, the bottom is blue. When an object is in the green area of the gradient, it means the light source is in front of it, so we highlight the green channel of its lighting texture. And when it's in the blue area, we highlight the blue channel accordingly.It doesn't work perfectly with multiple sources, but it's good enough that the average player won't notice minor inaccuracies."See the original Reddit post for details here and join our 80 Level Talent platform and our new Discord server, follow us on Instagram, Twitter, LinkedIn, Telegram, TikTok, and Threads, where we share breakdowns, the latest news, awesome artworks, and more.
·81 Vue