The Better Lit Shader acts as a replacement for the Built in pipeline’s Standard shader and URP/HDRP Lit shaders with the following features and improvements:
Supports URP, HDRP, and the Built In rendering pipelines, tested on 2019.4LTS and 2020.3LTS
HDRP style texture packing, or a custom tightly packed texture format for even faster shading
Tessellation & Parallax Support
Crack Free Tessellation mesh preprocessor
Stochastic sampling of textures to remove tiling
Tint Masking, allowing you to colorize 4 separate parts of the main texture layer independently.
HDRP Style Detail Texturing
Three additional independent Texture Layers, which can be used as a detail texturing, height blended, or alpha blended, with independent options for Triplanar and Stochastic on each layer. These can also be masked via vertex painting, noise functions, and procedural functions, allowing you to create many different effects.
MicroShadows and Fuzzy Shading available on every layer
Use UV, UV1, Triplanar, or world projections on each texture layer
Flat Shading
Single or Double Sided
Wetness, automatically integrates with Enviro and Weather Maker
Puddles, automatically integrates with Enviro and Weather Maker
Automatic placement of puddles via noise functions and angle filters
Snow system, automatically integrates with Enviro and Weather Maker
Wind system, for particulate wind over surfaces
Dissolve Effect, with optional gradient edge w/ optional emissive
Trax integration allows you to leave trails on any material you create
Vegetation Studio procedural indirect support
Support for all VR rendering modes
Generate normals directly in the shader to save sampling/memory on low end systems, or use the Surface Gradient framework for higher quality blending.
Branch Sampling, to reduce the cost of stochastic and triplanar sampling
Debuging mode to visualize actual sample count used by the shader
The Better Lit Shader was built using Better Shaders and is tested on URP7.x, URP10.x, HDRP7.x, HDRP10.x, and the Built in Rendering pipeline. No special install is required, just a single shader that runs on all of these different rendering systems.
Full source code in Better Shaders format is included, and all features are done as stackables, making them easy to add to your own shaders, or customize for your own needs.
All features work together and are available via an custom material GUI. Unused features are conditionally compiled out of the shader, and many features are available to make the shader more efficient than the URP Lit or Built In Standard shader.
Working in URP and want HDRP style features? Or want a more efficient URP shader? Want to port between pipelines and have everything “just work”? Want to apply unique procedural damage across your entire level? Want the most advanced shader available, regardless of which rendering pipeline you use? This is the shader for you.
Such a very awesome asset. I had the pleasure of being in the beta and toy around. The ideas keep on spreading once you start using the asset. Can’t wait to see what everyone else comes up with. By the way, most notably: This was HDRP, works the same in Standard and URP.
What’s also exciting is that you can define the strength of the effects. I tried with my own Fader asset to interpolate the strength over time, worked perfectly:
Don’t mind the missing obligatory splatter I just wanted to show the effect
The indoor puddles are exciting. Of course I had water first, but usually one thing leads to another and I wanted to toy around with a different category of game I’ve never done before
We just started testing this out for a major upcoming project (Pigeon Simulator) and seems really awesome so far!
Curious about a couple of things:
Any plans to add Texture Array support?
We’re using GPU Instancer extensively. Currently we’re using some colors and float value arrays with it to vary the looks of things within a draw. Moreover, we’re using a uint structured buffer (“Variation Values” in GPU Instancer) to reference which texture in a texture array gets used. This is all pretty niche stuff, but any chance we can do this with your product?
Thank you for your time, and for building this shader magic!
Do micro shadows depend on the volume override and are used for the directional light only or is this your own implementation?
Do you have any plans to support Virtual Textures?
How often do you plan to update this asset? Will it be compatible with LTS only releases, or can we hope for other stable or even beta versions support?
Do you have any plans to integrate Bakery features into it?
It’s based on naughty dog’s technique, for the directional light only.
Not currently.
I will only officially support LTS releases, because doing anything else means you’re effectively Unity’s indentured servant, chasing after undocumented and unfinished changes on a constant basis with no help from Unity.
Haven’t really looked at it yet as it’s quite new in Unity.
I can’t control what Unity breaks. In the past, they’ve broken things in LTS versions and between point releases (7.18 to 7.21 in URP for instance), which isn’t supposed to happen. In general, the SRPs are pretty unstable, though I’d say the trend is that they break things less these days than they used to. While many people run non-LTS versions, I don’t even look at them, since Unity can’t really be bothered to document their pipeline any change requires diffing tens of thousands of lines of code.
Too bad, though understandable. Your shader looks perfect, and I would gladly replace a lot of shaders in my project with it, except I can’t, because they heavily depend on the Bakery SH + Specular feature. I’ve also planned to update them to use SVT, but haven’t tried it yet as well.
I couldn’t be bothered to convert 10 materials of a humanoid manually, so I took Unity’s HDRP converter and made a BetterLitShader converter mod of it which at its current state converts selected or all project materials from HDRP/Lit to Better Lit/Lit.
Please note the Unity Companion License in case you want to use it: