A shader for Unity designed to create a retro look but with modern PBR features.

Licensed under Creative Commons Attribution 4.0 - (TL:DR; you can use it however you want, including for commercial projects, but you must credit me if you do)

Requirements:

  • Universal Render Pipeline (2020 or later)
  • Shader Graph Markdown is required for the material editor to look correct, but the shader will still work without it.


Known Issues:

  • Normal maps cause the per-texel calculations to go a little extra weird. This is usually fine, unless you let the camera get way up close to your textures. Smooth shaded models without normal maps have this issue too, but to a much lesser extent. As far as I know, this is a necessary trade-off, and can't really be fixed.
  • Does not currently support Subtractive lighting mode.
  • Does not support Screen Space Shadows on URP 2021.
  • Yes, the regular shader has "(NOT Transparent)" in the name.
    • This is a dumb workaround to make Unity bake lighting for objects that have Alpha Cutoff enabled. If you know a way to fix this I'll gladly take your help.

Features & Options:

  • Blend Modes:
    • Opaque
    • Alpha Cutoff
    • Transparent (Alpha Blend)
      • With refraction!
  • PSX-style vertex snapping and texture mapping
  • Texture Filtering:
    • Linear
    • Nearest
    • N64-style
  • 3 lighting modes:
    • Per-Pixel
    • Per-Texel
      • Snaps lighting to texels for a crisp pixel art look
      • Supports baked lights too!
    • Per-Vertex
      • More powerful than regular vertex lights!
      • Real-time vertex shadows!
      • Specular highlights!
      • Vertex-based lightmaps!
  • SSAO Support
    • In Per-Texel and Per-Pixel modes
  • 4 different specular modes
    • Standard (URP default)
    • Phong
    • Blinn-Phong
    • Disabled
  • Half-Lambert diffuse shading
  • Toggleable reflections
  • 2 Vertex Color modes
    • Multiply Vertex Color
    • Vertex Color as Emissive
  • Dithered lighting
    • Diffuse, Specular, and Ambient can be toggled separately
    • Double-size dither for that low res feel
  • Tint masking
    • Color your object selectively using a texture mask
  • Toon ramp support
    • Separate ramps for specular and diffuse lighting
    • Works in all three lighting modes
    • Generate ramps directly in the editor with Shader Graph Markdown!


Per-texel calculation code is originally by GreatestBear and truepak.

Thanks to Action Dawg for help with the affine UV code!

StatusReleased
CategoryAssets
Rating
Rated 4.9 out of 5 stars
(14 total ratings)
AuthorAndrea Jörgensen
TagsShaders, Unity

Download

Download NowName your own price

Click download now to get access to the following files:

Retro Master (URP 2021) 129 kB
Version 2
Retro Master (URP 2020) 113 kB
Version 2
Example Toon Ramps 2 kB

Development log

Comments

Log in with itch.io to leave a comment.

can some one help me on how to install this in unity? i don't know anything of how to install it. please dm me to day. il wait

Does it work for unity 2023? Any compatibility issues or plans to know of?

this is awesome! i payed for an asset that does the texel lighting thing and this does it the exact same but with such cool other features, only issue i have that is keeping me back from fully using this in my game is that light clips through walls and ceilings for whatever reason when any other shader wouldnt and i cant seem to figure out why, either way good work!

The GOAT I have been looking for ages for something that covers just a portion of the capability of this shader.

This is looking amazing! Could you please provide a sample project? That would greatly help figuring things out.

(1 edit)

Hi there!

Is there any chance to have a paid version of the asset that is not CCAttribution?

I have no problem crediting you, but in some cases it may not be possible (by customer request mainly).

A Unity Asset Store (paid) version (with Unity's standard licensing) would be very welcome as well!

On another note, I cannot get my game to actually build with this (runs fine in game mode) - have checked and made sure that screen space shadows are off too.


Shader error in 'Andicraft/Retro Master (NOT Transparent)': Program 'Vert', error X4571: vs_4_0 output limit (16) exceeded, shader uses 17 outputs. at line 110 (on d3d11)

I'm seeing this as well

Beautiful work, but is there any way to make this work with the Unity URP decal projectors?

This is awesome! I'm mostly interested in the per textel lighting - do you think it's possible to add this feature to built in pipeline's standard shader on unity 2019? Tried to convert my project but it's causing issues with some other assets. 

URP only! Lighting in BIRP is mildly more annoying and I don’t wanna screw with it

This is the best thing I've ever seen in my entire life.

Oh this is going to be useful! =D

Wow

For free??? Bruh