3D Pixel Art Shadows (Texel Space Lighting Shader for URP)

Ciberman

(5)
$8
Publisher Ciberman
File size 1.38MB
Number of files 25
Latest version 1.1.4
Latest release date 2022-01-18 12:54:15
First release date 2020-06-12 11:39:10
Supported Unity versions 2018.4.2 or higher

This Universal Render Pipeline shader creates pixel perfect lights and shadows. Ideal for 3D games with pixel art textures.


Works in Universal Render Pipeline. Supports all the features supported in the default "Simple Lit Shader", in fact, you can replace all your material shaders without having to change anything.



Features:

  • Universal Render Pipeline (Forward renderer)
  • Optimized for mobile (The shader is based on the default Simple lit shader)
  • Pixel perfect 3D shadows for both main light and extra light sources
  • Supports all kinds of real time lights and baked lights
  • Supports shadow cascades
  • Compatible with Scriptable Render Pipeline (SRP) Batcher
  • Compatible with instancing

Requirements:

  • Pixel Art Lights Shader v1.1.3:
    • Tested in Unity 2021.2.7f1 and URP 12.1.2 (Forward renderer)
  • Pixel Art Lights Shader v1.1.2:
    • Tested in Unity 2020.3.7f LTS and URP 10.4.8
  • Pixel Art Lights Shader v1.1.1:
    • Tested in Unity 2020.2 and URP 10.2.2
  • Pixel Art Lights Shader v1.0.0:
    • Tested in Unity 2019.3 and URP 7.1.8

Each release of the shader has been tested with the specified Unity and URP version but it should work with any version posterior. Also, I will try the package works with any LTS Unity release. So if you find a bug, please send me an email.


How it works?


This shader uses a technique called Texel Space Lighting. Basically the lighting is calculated in texel space (Texture pixels) instead of fragments (screen pixels). This means the shadow pixels will always “snap” to the pixels of the texture of your mesh.


For advanced users that love to write their own shaders, the package contains a simple include file with utility macros you can use to snap ANY value you want (not only shadow map coordinates) to your texture pixels so you can create more advanced effects. (See TexelSpaceShading.hlsl for more info)


Instructions to use it


Simply change all your materials that use the “Universal Render Pipeline/Simple Lit” shader in your game to use “Ciberman/Texel Space Shading” Shader. That’s all.


This Shader is 100% compatible with the Simple Lit shader, so you should not have any problems upgrading it.



Contact


Javier “Ciberman” Mora


[email protected]

Top Publisher Assets