3D Lights
Last updated
Last updated
Version 4.0 introduces a 3D Lit shader that supports all light types across all render pipelines. This shader variant will allow you to create games in the style of Octopath Traveler:
*The feature is still very early and it may have issues in specific render pipelines of specific versions. If you find some error or you have any suggestion please reach out to: seasidegamestudios@gmail.com Also, keep in mind that all pipelines are supported except the 2D Renderer, where this shader variant makes no sense, there’s a specific 2D Renderer Lit variant
As usual you can add this shader variant by selecting the Lit option in the asset component:
Alternatively you can also manually select it in the Material Inspector:
The feature also has its own Demo that you can find in the following scene: AllIn1SpriteShader\Demo\DemoLitShader
If the shader is added through the asset component the shadow configuration will automatically be done for you. Otherwise you can manually set the following in the Material Advanced Configuration:
And enable cast shadows in the sprite (it needs debug mode to be active):
If you want to add a Normal Map the shader variant has an effect for that:
And the asset component has a button that will activate the normal map effect, create a normal map texture and add it to the material:
This lit shader was created using Better Shaders, a Unity Asset by Jason Booth that simplifies cross-pipeline shader development. This Better Shaders file can be found over at:
AllIn1SpriteShader\Shaders\ShaderPackager\BetterShaders_AllIn1Sprite.surfshader
The source file has been packaged into AllIn1SpriteShaderLit.allIn1ShaderPack. This file contains versions of the shader for all pipelines and versions. This is what you’ll use if you don’t own Better Shaders. (You can buy it here if you want to:
If you do own Better Shaders, you are free to open the source file and change whatever you want.