# OmniShade PBR

Physically Based Uber Shader for Unity

{% embed url="<https://youtu.be/lIsi-IVYsdM>" %}

Uber PBR shader, with everything the Standard Lit shader has and more with stylized lighting, blended layers, texture painting support, and blazing performance.

### Get it at Unity Asset Store

* [**OmniShade PBR**](https://assetstore.unity.com/packages/vfx/shaders/omnishade-pbr-physically-based-uber-shader-216249)

### One shader to rule them all

**OmniShade PBR** is a physically-based uber shader, able to achieve realistic lighting in a way that non-PBR shaders cannot.  It is a highly extended version of the Unity Standard Lit shader, carrying over many of the great features from [OmniShade](https://www.omnishade.io/), including rim light, reflections, blended layers, texture painting support, and more. \
It also offers blazing performance due to an automatic system of detecting the minimum calculations needed for any given feature set. And best of all, it was built with Unity **Shader Graph** -- so you can rest assured that it will always be supported with the **widest compatibility** on any pipeline going forward including Built-In, URP, and HDRP.

If you've been using Standard Lit shader, then this will be a straight-forward upgrade, allowing you to fully integrate vertex color and texture painting with fantastic free tools like [Polybrush](https://unity.com/features/polybrush), add additional rim lighting and reflections for special effects, use secondary detail maps, apply layered decals, add additional colors based on object heights, or simply fine tune colors and texture tiling parameters.&#x20;

### Features

All of the below **can be used in any combination,** **with optimal performance.**

* PBR lighting
* Metallic map, Normal map, Occlusion map, and Emission map
* Secondary Normal map
* Color adjustments + saturation
* Rim light
* Reflection map
* Vertex colors with [Polybrush ](https://unity.com/features/polybrush)support
* Detail map
* [3 blended layers](https://www.youtube.com/watch?v=PgEv3Au6X08) with texture painting support
* Height-based coloring
* Shadow overlay
* Vertex-sway for vegetation
* Fade with camera distance
* Independent UV tiling & offsets for each texture
* Opaque and transparent versions

**...see Features for in-depth specs of each feature.**

On top of this, we also include:

* **Built-In, URP** and **HDRP** pipeline support&#x20;
* **Progressively adaptive performance** which automatically detects and generates the minimal shader variant for any given set of enabled features
* Built with **Shader Graph** for **maximum compatibility**
* Script for animating textures in the shader
* Slick collapsable shader UI, easily extendable
* Modular design with 20 subgraphs, for reusability with other shader graphs
* Tutorial demo scene

With OmniShade PBR, we bring the features that mobile developers have come to love in  [OmniShade](https://assetstore.unity.com/packages/vfx/shaders/omnishade-mobile-optimized-shader-215111) to high-def PBR games as well.  We hope you love it!

**On performance**, this shader offers similar performance to Standard Lit shader, and has a feature set designed to be fast enough for newer mobile devices.  However, if you are targeting broadly mobile or doing a non-PBR game, we recommend the non-PBR version of [OmniShade](https://www.omnishade.io/).

![](/files/kOO1VZCcuFjCpzp16AAO)


# Getting Started

#### Configuration

Ensure the **Shader Variant Limit** in *Project Settings→Shader Graph* is set to **100,000**.  After setting this, it may be necessary to re-import the shaders (*OmniShade PBR* and *OmniShade PBR Transparent*).

The shader supports Built-In, URP and HDRP pipelines.  The latest version is by default initially configured to work with all three.  If you are getting errors or the materials in the sample scene appear magenta, then you may need to configure your setup:

* For **URP pipeline**, if you need help installing URP, follow the [Unity URP Installation Guide](https://docs.unity3d.com/Packages/com.unity.render-pipelines.universal@15.0/manual/InstallURPIntoAProject.html).
* For **Built-In** or **HDRP** pipeline, you may need to configure the shader's Active Targets.  To do this, open *OmniShade PBR.shader* in Shader Graph.  Under [Graph Settings](https://docs.unity3d.com/Packages/com.unity.shadergraph@10.8/manual/Graph-Settings-Menu.html), press the ➕ to add **Built-In** or **HDRP**.  For the settings, copy the same from URP (set Custom Editor GUI to **OmniShadePBRGUI**, Alpha Clipping is On), and save the graph.  Repeat the same for the *OmniShade PBR Transparent.shader.*
* <mark style="color:purple;">**For improved shader build times and performance, remove the Active Targets that you do not need (ie., remove Built-In if you only use URP, and vice versa).**</mark>

#### Usage

Start by opening the sample scene in *OmniShade PBR/Sample Scene URP/Sample Scene.unity*.&#x20;

1. Feel free to move the camera around and browse the sample materials in the scene, and experiment with the shader's parameters to get an idea of what the shader can do.
2. For more details, refer to the [Features](/documentation/features) and [FAQ](/documentation/faq).
3. Start creating your own materials with OmniShade PBR.  You're on your way!

<figure><img src="/files/zdLSFtDL284MLJbfaCcI" alt=""><figcaption></figcaption></figure>


# Features

### Shader Features

#### Physically based lighting

As an extension of the Unity [Standard ](https://docs.unity3d.com/Manual/shader-StandardShader.html)(or Lit in URP) shader, OmniShade PBR also takes as input a [Metallic ](https://docs.unity3d.com/Manual/StandardShaderMaterialParameterMetallic.html)and [Smoothness ](https://docs.unity3d.com/Manual/StandardShaderMaterialParameterSmoothness.html)parameter to compute the lighting.  Metallic controls the "metalness" of a material, and Smoothness the "microsurface detail".  The shader is built using the [PBR Master Node](https://docs.unity3d.com/Packages/com.unity.shadergraph@8.0/manual/PBR-Master-Node.html), supporting all of Unity's lighting features.

#### Metallic map

Used as a mask for the [Metallic ](https://docs.unity3d.com/Manual/StandardShaderMaterialParameterMetallic.html)and [Smoothness ](https://docs.unity3d.com/Manual/StandardShaderMaterialParameterSmoothness.html)values.  The Metallic value is taken from the red channel, and Smoothness from the alpha channel.

#### Normal map

[Normal maps](https://docs.unity3d.com/Manual/StandardShaderMaterialParameterNormalMap.html) are a special kind of texture that allow you to add surface detail such as bumps, grooves, and scratches to a model which catch the light as if they are represented by real geometry.  Secondary Normal map supported as well.

#### Occlusion map

[Occlusion map](https://docs.unity3d.com/Manual/StandardShaderMaterialParameterOcclusionMap.html) is a greyscale image providing information about which areas of the model should receive high or low indirect lighting.

#### Emission map

[Emission ](https://docs.unity3d.com/Manual/StandardShaderMaterialParameterEmission.html)is the light emanating from an object.  The Emission Map is a mask for the light.

#### Rim light

Adds a light around the silhouette of the object, highly versatile for special effects, lighting detail, or emphasis.  Tunable parameters include color, amount, and contrast.  Also supports invert, and specifing a rim direction (in worldspace) as well.

#### Reflection

Applies a separate reflection on the object taken from a cube map.  Parameters include color and reflection amount.  If Mask With Rim is enabled, it works in pair with the rim's fresnel effect to strengthen the reflection at the edges.  Can also mask it with the Metallic Map.

#### Vertex colors

Used for [vertex painting colors](https://www.youtube.com/watch?v=PgEv3Au6X08) with tools such as [Polybrush](https://www.google.com/url?sa=t\&rct=j\&q=\&esrc=s\&source=web\&cd=\&cad=rja\&uact=8\&ved=2ahUKEwjQ-o6skYn2AhWKr4sKHfJ2AKEQFnoECAYQAQ\&url=https%3A%2F%2Funity.com%2Ffeatures%2Fpolybrush\&usg=AOvVaw1oZ_Ik8CVTOiNQKhpMcJpc).  Supports all RGBA channels. Toggleable on or off, with an amount and contrast setting.  The channels can be used as a mask on the three texture layers and the Detail Map for texture painting effects as well.  Be aware that the color resolution depends on the number of vertices in the mesh.

#### Detail map

Detail maps, or secondary maps, blend in granular details to the base texture using either a multiplicative or alpha-based blend mode.  The alpha is sampled from the alpha-channel of the texture and Detail Color.  There is also an option to mask the detail map with the vertex color alpha channel, useful in vertex painting.

#### Layers

Similar to Photoshop layers, these are useful for decals or [terrain splatting](https://www.youtube.com/watch?v=PgEv3Au6X08) with tools like [Polybrush](https://www.google.com/url?sa=t\&rct=j\&q=\&esrc=s\&source=web\&cd=\&cad=rja\&uact=8\&ved=2ahUKEwjQ-o6skYn2AhWKr4sKHfJ2AKEQFnoECAYQAQ\&url=https%3A%2F%2Funity.com%2Ffeatures%2Fpolybrush\&usg=AOvVaw1oZ_Ik8CVTOiNQKhpMcJpc).  The layers are rendered in order from 1 to 3, so that layer 3 is on top.  The masking is controlled via the layer's alpha channel, in addition to a Color parameter.  Also supports masking with vertex color RGB channels for texture painting.&#x20;

#### Height-based colors

Highly versatile effect, this is useful for height-based coloring such as rendering the water line, tree roots, or even indirect lighting.  Height can be set in either local or world space.  Color, thickness, and edge thickness can be adjusted.  You can also apply a Height Texture as the background with this effect.

#### Shadow Overlay&#x20;

This effect projects a texture over objects using world-space positions, useful for creating global effects like rolling cloud shadows or tree leaf overhangs. It is fully animatable through the shader, either as a scrolling or ping-pong movement. Speed and sway amount are adjustable.

#### Plant Sway&#x20;

Useful on vegetation to simulate movement by wind. Uses a vertex-shader based animation dependent on object height. Animation is fully done in the shader, and plant type can be set for plant or leaves. The sway amount and speed are adjustable. The phase variation affects the synchronicity of the objects affected.

#### **Camera Fade**

Fades the transparency of the object as it approaches the camera.  Use Fade Start Distance and Fade End Distance to adjust when the fading occurs.

**Opaque and transparent versions**

Included is an opaque and transparent version.  If you need additional culling or blend modes, you can duplicate a new shader graph and adjust these from the [Material Options](https://docs.unity3d.com/Packages/com.unity.shadergraph@7.4/manual/PBR-Master-Node.html?q=pbr%20master#material-options) on the PBR Master Node.

### Other

**Progressively adaptive performance**

Despite offering a wide range of features, OmniShade PBR is blazingly fast through the use of shader variants, only doing the minimal calculations needed for any set of enabled features, which it is able to detect automatically. This allows precise and granular control over the quality and performance to achieve maximum value.

#### Animating Textures

Included is a *OmniShadePBRAnimateTexture* component which can be used for easily animating the movement of any texture in the shader.  Animation type can be either slide or ping-pong.

**Shader Graph**

We in the field understand that continual support is paramount to a product's viability in production.  That's why we chose to build OmniShade PBR with Unity [Shader Graph](https://unity.com/features/shader-graph), so you can expect it to fully function with all of Unity's great lighting features, and have the widest compatibility going forwards.  We also used a highly modular design, with 15+ subgraphs, so you can reuse any of the components in shader graphs you design yourself.


# Compatibility

#### Unity Version

**Unity 2021** through **Unity 6**

#### Render Pipeline Compatibility

* Built-In Pipeline
* Universal Render Pipeline
* High Definition Render Pipeline

#### Additional Information

* Built with **Unity Shader Graph**, so you can rest assured this will **always have the widest compatibility**.


# Release Notes

#### 1.3.0

*April 18, 2025*

・Update to Unity 2022

#### 1.2.8

*May 10, 2023*

・Reflection: Fixed bug with normals

#### 1.2.7

*March 25, 2023*

・Fix a Polybrush-related warning

#### 1.2.6

*February 16, 2023*

・Fix transparent shader for URP in Unity 2022

#### 1.2.5

*November 13, 2023*

・Fix to automatically increase ShaderGraph settings variant limit

#### 1.2.4

*October 16, 2023*

・Plant sway: Fix so rotations don't affect sway direction

#### 1.2.3

*August 7, 2023*

・HDRP: Fix an asmdef related issue

#### 1.2.2

*June 1, 2023*

・Emission map: Fixed to use all color channels

#### 1.2.1

*February 6, 2023*

・Fixed a bug with changing rendering pipelines from 1.2.0

#### 1.2.0

*January 28, 2023*

・Updated base version to Unity 2021\
・Code cleanup

#### 1.1.1

*November 23, 2022*&#x20;

・Fixed SRP batching

#### 1.1.0

*November 5, 2022*&#x20;

・Added Normal Map 2 \
・Added Shadow Overlay\
・Added Plant Sway \
・Added Camera Fade for transparent shader\
・Built-In pipeline supported from Unity 2021.3.12

#### 1.0.7&#x20;

*November 4, 2022*&#x20;

・Reflection: Added option Mask With Metallic Map\
・Height colors: Added option to specify a texture

#### 1.0.6&#x20;

*October 30, 2022*&#x20;

・Rim: Added Intensity parameter\
・Built-In support added for Unity 2022.2

#### 1.0.5&#x20;

*October 6, 2022*&#x20;

・Fixed some materials in sample scene

#### 1.0.4&#x20;

*April 5, 2022*&#x20;

・Detail map: Added contrast parameter

#### 1.0.3&#x20;

*April 4, 2022*&#x20;

・Emission: Fixed color selection \
・Material converter: Improved to preserve more values

#### 1.0.2&#x20;

*March 28, 2022*&#x20;

・HDRP: Fixed broken transparency on Unity 2020 and 2021 \
・HDRP: Display more rendering options on Unity 2021 \
・Removed the menu to convert materials, and made this automatic on switching shaders.

#### 1.0.1

*March 25, 2022*

・HDRP: Fixed UI showing unused parameters\
・HDRP: Fixed Emission defaulting to on\
・Added menu to convert existing materials to OmniShade PBR

#### 1.0.0

*March 21, 2022*

・OmniShade PBR released!


# FAQ

#### What is the difference between OmniShade and OmniShade PBR?

The main difference is that **OmniShade PBR** uses physically accurate lighting and was built using [Shader Graph](https://docs.unity3d.com/Manual/shader-graph.html), while [**OmniShade**](https://www.omnishade.io/) offers more stylized lighting and was hand-coded from the ground up.  They share some features, but differ greatly in the lighting quality, performance, and implementation.

The **PBR version**, as an extension of the [Standard Shader](https://docs.unity3d.com/Manual/shader-StandardShader.html), is fully integrated with all of Unity's lighting features and pipelines.  With a physically based model, the material can be tuned once and look realistic in any lighting condition.  And since it was built using Shader Graph, even non-coders will be able to understand and make modifications.

The **non-PBR** **version** on the other hand, is far faster in raw performance as it was written from the ground up to ensure performance on mobile platforms.  As such, it is more limited in its integration with Unity lighting features, and the non-PBR results can end up looking cartoony rather than realistic.  It is also able to offer more features, customization and performance through its code-based implementation.

In short, if you are developing for mobile or not creating a PBR-looking game, then the non-PBR version will likely suit you more.  If you've already been using the Standard Lit shader, then the PBR version will be a straight-forward upgrade.  Of course, you can also always use both in a URP project as well.

#### Is this compatible with X platform?

Yes.  Because OmniShade PBR was built using Unity Shader Graph, it is fully integrated with all Unity lighting systems, and compatible with any platform Shader Graph is.  If it works with the Standard Lit shader, it will work with this shader and with similar performance.  Plus, it will only get better and faster over time with Shader Graph package updates. &#x20;

#### Can I do vertex color and texture painting with a tool like Polybrush?

Yes, you can!  We offer one of the most Unity-integrated shaders that support Polybrush color and texture painting.  Learn how to [paint textures](https://www.youtube.com/watch?v=PgEv3Au6X08) using the layers (the video tutorial is with non-PBR OmniShade, but the technique is the same).  Note, the latest version (1.1.6) of Polybrush may have bugs painting meshes (particularly on URP), so I recommend downgrading to 1.0.2 if you experience any issues.

#### How do I get two-sided rendering, or additive blending?

This will require you to duplicate the graph at this time, but is otherwise quite simple.  Duplicate the graph, and open the new one.  In the [Graph Settings](https://docs.unity3d.com/Packages/com.unity.shadergraph@10.8/manual/Graph-Settings-Menu.html) menu, there are settings to adjust two-sided rendering and blend modes.

#### What is physically based rendering?

PBR is the concept of applying physically accurate lighting, based on principles like energy conservation or reflections based on microfacets.  Although a non-PBR shader can be made to look as good as a PBR shader, it would require considerable tuning -- and re-tuning were the lighting conditions to change.  The Unity Standard shader is a PBR shader, and what OmniShade PBR is based on.  The atmosphere of realism seen in recent AAA games can largely be attributed to PBR rendering.

#### Why is it so slow to compile the shader?

Updating to the latest Unity version may help with Shader Graph build times.  Moreover, if you remove the Active Targets to only the ones you need (ie., remove HDRP if you only use URP), that will also significantly reduce compilation time.

#### Can I use this shader in my commercial game?

Absolutely!\
No attribution is required, although appreciated.


# Videos

[**OmniShade YouTube channel**](https://www.youtube.com/channel/UC9zwQIusdd2nU9A6jm2Z3Zw)

{% embed url="<https://youtu.be/lIsi-IVYsdM>" %}

{% embed url="<https://youtu.be/kMI0rytuHkE>" %}


# Images

![](/files/kOO1VZCcuFjCpzp16AAO)

![](/files/i0COIa2d1Fiy1eSfZd4s)

![](/files/WbfCPvuBimV7RTngkCl6)

![](/files/NdTlEBJQkOQNHiveXNeQ)

![](/files/DNRKF4EHvlhLt9QGRVHJ)

![](/files/3d0X5ic8lzawWM7csnwR)

![](/files/Noirtq79ApgKE9ZlF10j)

![](/files/BeBeL56VQSHsKHOHQ85C)

![](/files/aPWBmUM11qk1wphiltXO)


# Playable Demo

Simple demo which demonstrates a variety of the shader's capabilities.

<https://simmer.io/@OmniShade/omnishade-pbr> (78.3MB)

![](/files/I38nkfnPfXzwzwnucV2b)


# Support

Found a bug or have a request?  Don't fret, let us know and we'll do our best to solve it!

Or, just show us the cool stuff you made!  We're happy to listen.

* [Discord](https://discord.gg/kUjRacF3hE)


# About

The shader to rule them all

Ever thought all games look the same? You know, that "Unity look"? \
Yeah, we're tired of it. And want to change things for good.

Developing shaders, at the rondo of light and darkness, to give creators the tools to achieve any look they can dream.

### Contact <a href="#contact" id="contact"></a>

#### Have a request or technical issue?

Please check the [Documentation ](/documentation/features)or [Support ](/support/support)section, or email:

<contact@omnishade.io>


