# OmniShade

Mobile-Optimized Shader for Unity

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

Fully-featured stylized shader for Unity, optimized for mobile devices.  Packed with all the latest techniques, yet blazingly fast due to a progressive system of calculating only what it needs to.

### Get it at Unity Asset Store

* [**OmniShade**](https://assetstore.unity.com/packages/vfx/shaders/omnishade-mobile-optimized-shader-215111)
* [**OmniShade Pro**](https://assetstore.unity.com/packages/vfx/shaders/omnishade-pro-mobile-optimized-shader-213594)

### One shader to rule them all

**OmniShade** is a highly performant shader designed for mobile devices.  It is packed with a multitude of techniques allowing it to achieve almost any look from realistic to toon to anime, yet also blazingly fast due to an adaptive system of calculating only what it needs to for any feature set.

It was designed to bridge the gap between Unity's Standard Shader and mobile shaders, but can often look even better than desktop-class shaders due to its high level of stylization, combination, and customization. &#x20;

All of the sample images above were rendered using only OmniShade, the variety of expression is limitless.  It can be used for a game with complex lighting or simple sprites -- regardless, the performance is always optimal.  It is quite possibly **the only shader you will need for your entire game.**

### Features

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

* Color adjustments + desaturation
* Diffuse soft lighting
* Specular map + hair highlights
* Rim light
* Reflection
* Normal map
* Occlusion map
* Emissive map
* [MatCap](https://www.youtube.com/watch?v=qPVUW1tFT-0)
* [Vertex colors for vertex painting](https://www.youtube.com/watch?v=PgEv3Au6X08)
* Detail map
* [3 blended layers](https://www.youtube.com/watch?v=PgEv3Au6X08)
* Transparency mask
* Height based colors
* Shadow overlay
* Vertex-sway for vegetation
* Outline
* [Anime ramp lighting](https://www.youtube.com/watch?v=5SPnj8zSPMw)
* Fade with camera distance
* Flat shading
* Environmental lighting, fog, and light probes
* Shadows + shadow colors
* Unity baked global illumination support
* <mark style="color:purple;">**(Pro feature)**</mark> [Triplanar projection texture mapping](https://www.youtube.com/watch?v=U_K1lnhjlFI)
* Full access to culling and blend settings + presets for opaque/transparent objects
* [Highly tunable controls for all features](https://www.youtube.com/watch?v=B_ynmnnJvfg)

**...see** [**Features** ](#features)**for in-depth specs of each feature.**

On top of this, we also include:

* **Built-In** and **URP** pipeline support
* **Progressively adaptive performance** which automatically detects and generates the minimal shader variant for any given set of enabled features.
* <mark style="color:purple;">**(Pro feature)**</mark>**&#x20;Optimized shader stripping** on a per-material basis for minimum build size and memory
* <mark style="color:purple;">**(Pro feature)**</mark>**&#x20;Custom fallback shader** on Open GL ES 2, so your game looks great for even grandma
* Script for animating textures in the shader
* Slick collapsable shader UI, easily extendable
* Set of tutorial demo scenes

It's true, the Standard Shader is still too slow for mobile devices.  And let's face it, giving an artist Shader Graph is like giving a baby a gun.  But it doesn't mean you have to compromise on your game's looks.

![](/files/NNH3dzSyhYv5eA8NfSv5)


# Getting Started

* For **Built-In pipeline**, start by opening the sample scene in *OmniShade/Samples/Basic/Basic.unity*. You can safely ignore any warnings regarding the URP version of the shader if you do not have URP packages installed.
* For **URP pipeline**, start by opening the sample scene in *OmniShade/Samples/Basic URP/Basic URP.unity*. 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).

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. There are other sample scenes as well, each demonstrating a different technique of the shader.  Check those out too for ideas on how to use the shader.
3. If you are using the MatCap feature, for tips on creating your own MatCaps, read *OmniShade/Samples/MatCap Textures/How to create MatCaps.txt*
4. For more details, refer to the [Features](/documentation/features), [FAQ](/documentation/faq), and [Optimization Tips](/documentation/optimization-tips).
5. Start creating your own materials with OmniShade.  You're on your way!

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


# Features

### Shader Features

#### Diffuse

Diffuse softness is adjustable, along with brightness and contrast.  There is also an option to enable per-pixel diffuse, which will get you better point-light quality on low-poly meshes but this is more computationally expensive.  On scenes with lightmapping baked in, the diffuse light is disabled for static lightmapped objects since this is baked in.  The toggle for Baked And Dynamic Lights enables the object to receive both baked and dynamic lights (from point lights only) on URP.\
**Note**: *Spot lights are supported only on URP.  For Built-In Pipeline, you can use a* [*Projector*](https://docs.unity3d.com/Manual/class-Projector.html) *to achieve nearly the same effect as spot light.  On URP, Additional Lights should be set to Per Pixel.*

#### Specular

Used for metallic or shiny objects. Supported for 1 directional light, with an optional specular map.  The color defaults to using the same as the directional light's, but there is an override color as well.  Brightness and smoothness adjustable as well.  On the specular map, the red channel masks the specular intensity, and the alpha channel the specular smoothness.  There is also an option for Specular Hair, which has brushed highlights for effects like hair or brushed metal.  When using Specular Hair, the normal map has no effect.  Rather, the Specular Map is used to slightly shift the normals to give variance.  On scenes with baked directional lighting, the lighting direction is sampled from the directional lightmap instead.

#### Rim Light

Highly versatile effect for simulating indirect lighting or subsurface scattering like skin. Tunable color, brightness, and contrast parameters. Also supports multiple blend modes, invert, and rim direction as well.  Can even be used to fade the transparency of outer edges to create fuzz effects.

#### Reflection

If enabled, by default it uses the scene's skybox material from Lighting Settings.  You can override the cubemap texture in the material.  If Mask With Rim is enabled, it works in pair with the rim's fresnel effect to strengthen the reflection at the edges.  Reflection amount and color are adjustable.  Can also mask it with the Specular Map.

#### Normal Map

Supported for all light sources including diffuse, specular, lightmap, rim, MatCap, and even in the triplanar mapping as well.  Strength is adjustable.  Be sure to set the Texture Type for the texture as Normal Map.

#### Occlusion Map

Occlusion maps store local shadowing, or ambient occlusion in lookup textures.  Supports color, brightness, and UV1 and UV2.

#### Emissive

Used for objects that emit light.  Supports HDR color with an optional Emissive Map.  The HDR color slide allows adjusting the intensity above 1 in HDR workflows.

#### MatCap

Integration of [MatCaps ](https://youtu.be/qPVUW1tFT-0)with Unity's lighting system is one of the key features of OmniShade. MatCaps are enormously powerful, able to capture the entire lighting of a scene in a single texture. They are popular in 3D sculpting but also highly effective in scenes where the camera does not need to move much, as the only short-coming is the lighting is only captured from a single angle.  Supports blending with Multiply or Multiply Lighten modes, with brightness and contrast parameters.  There is also a Perspective Correction option which can be disabled for improved performance if you don't need it.  Finally, the Static Rotation option allows locking the MatCap to a manually set angle, useful if you absolutely do not want the lighting to move with the camera.  Also, check out[ ZBrush MatCaps](https://pixologic.com/zbrush/downloadcenter/library/) to download more or create your own.

#### 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 a 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 vertex count in your mesh geometry.

#### Detail map

Detail maps, or secondary maps, blend in grainular details to the base texture. The alpha-channel of the texture is used as a blend factor.  Supports multiple blend modes, and UV1 or UV2.  Also supports adjustment of color, brightness, and contrast. Toggling the option to apply the detail map to the lighting will apply the detail as a mask to the Diffuse and MatCap lighting instead, which is useful for adding detail in the lighting for effects like sparkles.  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.  Supports multiple blend modes, and layer masking with the layer texture alpha-channel.  Also supports masking with vertex color RGB channels for texture painting. Brightness and transparency adjustable.

#### Transparency mask

This modulates the final alpha of the object, useful for effects like smoke or waterfall effects. Input texture can be either alpha or grayscale based. Alpha and contrast adjustable.

#### Height Based Colors

Highly versatile effect, this is useful for height-based colors such as simulating the water line, or even indirect lighting from above and below.  Height can be set in either local or world space. Color, thickness, edge thickness, and blend mode can be adjusted.  You can also apply a Height Texture as the background with this effect.

#### Shadow Overlay

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

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, leaves, or based on vertex colors (which uses the alpha channel). The sway amount and speed are adjustable.  The phase variation affects the synchronicity of the objects affected.

#### Outline

Support for adding a colored outline around the object.  Options to adjust outline width, outline Z position offset to reduce interior outlines, hide interior outlines completely, and outline grouping.&#x20;

#### Anime

Easily convert to [anime-styling](https://www.youtube.com/watch?v=5SPnj8zSPMw) with a toggle.  There are 3 adjustable luminance ramps with 2 threshold settings, and a softness parameter.  Tune the softness to avoid overly harsh shading edges on polygons if you notice them.  Outlines can be created too through only the shader, by rendering the mesh twice with Vertex Extrude and Culling set to Front (see the included Unity-chan sample).

#### 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.

#### UV Tile Discard

Toggle portions of a model on or off at runtime based on UV coordinate values.  [UV Tile Discard details](#https-www.poiyomi.com-special-fx-uv-tile-discardshader-features).

#### Environmental Lighting

Support for Unity's Environmental Lighting settings (accessible via the Lighting Window), including Skybox, Gradient, or Solid Color. Also support for dynamic global illumination from  Light Probes.

#### Fog

Supports all of Unity's fog modes. Toggleable on or off.  Fog settings can be configured from the Lighting Window.

#### Shadows

Supported for 1 directional real-time light on Built-In, and all lights on URP.  Shadow Color is adjustable.  Be sure to tune the Shadow Distance parameter in your Lighting Settings for the best quality.  There is a Receive Shadows toggle in the shader to disable shadow calculations as well.  On scenes with baked lightmapping, the shadow is disabled for static-baked objects.  If you need realtime shadows on a light-baked scene, you can either used Mixed Lighting on your light with Subtractive Mode in the Lighting Settings, or simply add another real-time directional light to the scene and set the light's Culling Mode to not affect baked objects. &#x20;

#### Culling and Blending Settings

All the culling and blend mode settings are exposed and configurable in the shader, with predefined presets for convenience as well, eliminating the need to create separate shaders for slightly different render states (ie., Transparent, Cull None, Additive, etc).

#### Flat Shading

Great for stylized low-poly blocky looks.  Fully compatible with all lighting including diffuse, specular, rim, MatCap, and normal mapping. &#x20;

#### Unity Baked Global Illumination Support

Fully supports Unity's baked global illumination.  The proper albedo colors are output for proper indirect lighting effects.  The scene must have a baked light source, objects to bake must be marked Lightmap Static, and you can bake the scene from the Lighting Settings window.

#### <mark style="color:purple;">**(Pro feature)**</mark> Triplanar projection texture mapping

[Triplanar mapping](https://www.youtube.com/watch?v=U_K1lnhjlFI) is a peculiar but extremely powerful effect, useful for terrain, procedural geometry, and modular environments. It requires no UVs at all, and works by projecting a texture from all 3 axises onto the geometry.  Supports a separate texture from the top side as well, useful for simulating grass or snow coverings.  Blend sharpness can be adjusted.  If Use UV For Sides is toggled, then UV coordinates instead of the triplanar projection on the sides of the object.  Full normal map support as well.

### Performance

#### Progressively adaptive performance

The real magic of OmniShade is here, in it's adaptable performance. Through the use of shader variants, it only creates shaders with the minimal calculation needed for any set of enabled features, which it is able to detect automatically. So, you can use OmniShade to create a simple game with only diffuse lighting, or a realistic one, or any combination in-between, and the performance will always be optimal.  This allows precise and granular control over the quality and performance to achieve maximum value.

#### <mark style="color:purple;">**(Pro feature)**</mark> Optimized Shader Stripping

These are per-material shader stripping flags to improve Unity's shader stripping process to further reduce the size and memory of the shader.  Read more in the [Optimization Tips](/documentation/optimization-tips).

#### <mark style="color:purple;">**(Pro feature)**</mark> Custom Fallback Shader

On older OpenGL ES 2 devices, the shader falls back to a custom reduced set of features designed to preserve the original look.  More details in [Optimization Tips](/documentation/optimization-tips).

### Other

#### Animating Textures

Included is a *OmniShadeAnimateTexture* 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.

**Extendable Shader UI**

OmniShade has a slick collapsable UI.  But, we in the field also know complexity is death.  In real use, modifications and extensions are inevitable.  That's why we follow a KISS principle with the shader UI.  All the UI is auto-generated from the shader information, no need to fiddle with C#.  And if you wish to extend your own feature in a collapsable group, simply use our custom **HeaderGroup** attribute.  That's it.


# Compatibility

#### Unity Version

**Unity 2020** through **Unity 6**

#### Render Pipeline Compatibility

Built-in, Universal Render Pipeline

#### Additional Information

* Requires **OpenGL ES 3.0** for full functionality (equivalent of iPhone 5s and above).  On older devices, it will fallback to a subset of features (Pro feature).  The non-pro version will fallback to Unity's Diffuse shader.
* Supports VR, including Single Pass Stereo rendering.


# Release Notes

*While we strive to keep OmniShade bug-free and updated, there may occasionally be changes that require you to re-tune some materials.  We apologize in advance for these and will note these below.*

**1.9.5**

October 15, 2025

・Camera Fade: Support invert option

**1.9.4**

July 23, 2025

・Normal map: Fix strength setting

**1.9.3**

June 26, 2025

・Fix for Forward+ in Unity 6.1

**1.9.2**

June 3, 2025

・Fix bug with Saturation affecting fog color

**1.9.1**

April 18, 2025

・Update to Unity 2022

**1.9.0**

*February 28, 2025*

・Normal Map: Support adjusting strength for each normal map

**1.8.9**

*February 4, 2025*

・Added support for UV2 selection in Normal Map 2 and Layers 1, 2, 3

**1.8.8**

*January 15, 2025*

・Outline: Fixed outline Z offset

**1.8.7**

*January 13, 2025*

・Outline: Add support for outline Z offset

**1.8.6**

*November 10, 2024*

・URP: Add support for light cookies

**1.8.5**

*September 13, 2024*

・Point lights fixed in Forward+ pipeline

**1.8.4**

*August 17, 2024*

・Point lights fixed in URP

**1.8.3**

*July 28, 2024*

・Cutout transparency: Support to specify cutoff.

**1.8.2**

*July 25, 2024*

・Shadow colors fixed for point lights.

**1.8.1**

*April 25, 2024*

・Fix shader compilation warning on older platforms.

**1.8.0**

*March 22, 2024*

・UV Tile Discard: Bug fix\
・Fix to support latest version of Polybrush

**1.7.9**

*March 15, 2024*

・URP: Fixed script errors on Unity 2023

**1.7.8**

*January 19, 2024*

・URP: Fixed Forward+ error on Unity verions before 2022.3.17

**1.7.7**

*January 19, 2024*

・Outline: Added camera-independent width option

**1.7.6**

*January 18, 2024*

・URP: Added support for Forward+ rendering path

**1.7.5**

*January 16, 2024*

・URP: Added support for additional lights shadows\
・Added support for UV Tile Discard

**1.7.4**

*December 31, 2023*&#x20;

・Anime: Fixed bright spots artifacts with HDR Bloom

**1.7.3**

*October 17, 2023*&#x20;

・Plant sway: Add support for local space option

**1.7.2**

*October 16, 2023*&#x20;

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

**1.7.1**

*October 10, 2023*&#x20;

・URP: Fix for specular and reflection when SRP Batcher disabled and Instancing on

**1.7.0**

*October 6, 2023*&#x20;

・URP: Fix light layers in Unity 2022

**1.6.9**

*August 16, 2023*&#x20;

・Triplanar normal map: Added normal map 2 option, fixed bug with underside lighting

**1.6.8**

*June 9, 2023*&#x20;

・Outline: Added option to hide interior outlines

**1.6.7**

*June 3, 2023*&#x20;

・URP: Added support for Screen Space Ambient Occlusion

**1.6.6**

*June 1, 2023*&#x20;

・Animate textures script: Fix TransparencyMask&#x20;

**1.6.5**

*April 8, 2023*&#x20;

・Fixed default preset for Opaque blend settings

**1.6.4**

*February 20, 2023*&#x20;

・Shadows: Fixed bug with Mixed Lighting on iOS/Android devices \
・Flat shading: Fixed bug on Vulkan \
・Lightmap: Fix bug with Unity 2020

**1.6.3**

*February 15, 2023*

・Shadows: Fixed bug with Mixed Lighting shadow fading&#x20;

**1.6.2**

*February 11, 2023*

・Shadows: Fixed bug with Mixed Lighting where shadows appeared on back faces \
・Shadows: Fixed distance fading in URP

**1.6.1**

*February 9, 2023*

・URP Baked Lighting: Fixed specular and light probe shadows

**1.6.0**

*January 28, 2023*

・Updated base version to Unity 2021 \
・Triplanar: Added Local Space option \
・Diffuse Mixed Lighting: Renamed to Baked and Dynamic Lights, and fixed \
・URP Mixed Lighting: Fixed shadows \
・Code cleanup

**1.5.8**

*January 16, 2023*

・Outline: Fix flickering when used with HDR in URP

**1.5.7**

*December 20, 2022*

・Fixed Blend Preset for Opaque, which caused issues with HDR mode

**1.5.6**

*December 9, 2022*

・URP Shadows: Fix shadows with GPU Instancing\
・Fix bug when used with OmniShade PBR

**1.5.5**

*December 8, 2022*

・Cutout Transparency: Fix flickering

**1.5.4**

*November 16, 2022*

・Fix some warnings

**1.5.3**

*November 1, 2022*

・Added Camera fade effect\
・VR: Bug fix for view direction

**1.5.2**

*October 30, 2022*

・Environmental lights: Fix for Unity 2022.2

**1.5.1**

*October 28, 2022*

・Baked lightmaps: Fix for emissive lights

**1.5.0**

*September 26, 2022*

・Z-Offset: Fixed bug when used with Outline effect

**1.4.9**

*September 7, 2022*

・Reflection: Added support for mask with Specular Map \
・Triplanar: Precision-related bug fix for lower end devices \
・Bug fix for UV2 in Normal Map and Occlusion Map\
・Bug fix for specular in baked lighting

**1.4.8**

*August 30, 2022*

・MatCap: Bug fix for scaled objects\
・Reflection: Bug fix for scaled objects

**1.4.7**

*August 24, 2022*&#x20;

・Transparency Cutout: Fixed to work with Transparency Mask \
・Triplanar: Support for transparent texture

**1.4.6**

*August 5, 2022*&#x20;

・URP Light Layers bug fix\
・Flat shading bug fix on Unity 2021

**1.4.5**

*July 20, 2022*&#x20;

・Added support for Light Layers in URP

**1.4.4**

*July 5, 2022*&#x20;

・Mixed lighting bug fixes

**1.4.3**

*July 1, 2022*&#x20;

・Normal map: Added secondary normal map

**1.4.2**

*June 14, 2022*&#x20;

・Anime style: Fixed light color not working

**1.4.1**

*May 30, 2022*&#x20;

・Fixed occasional error with lightmap baking

**1.4.0**

*May 23, 2022*&#x20;

・Fixed bug with alpha cutout transparency when baking lightmaps\
・Fixed bug with light culling mask

**1.3.9**

*May 16, 2022*&#x20;

・Fixed bug with Outline thickness. \
・Fixed bug with lights affecting objects not included in their culling mask.\
・Added Depth pass in URP for compatibility with other effects.

**1.3.8**

*May 9, 2022*&#x20;

・Fixed bug where GPU Instancing was not shown in Rendering options of non-pro verison.

#### 1.3.7

*April 21, 2022*&#x20;

・Diffuse: Added Mixed Lighting option to enable improved support for baked and realtime lighting

#### 1.3.6

*April 18, 2022*&#x20;

・Added support for Layers in Triplanar shader

#### 1.3.5&#x20;

*April 14, 2022*&#x20;

・Fixed light culling mask in URP\
・Fixed bug with lightmap baking when using Saturation

#### 1.3.4&#x20;

*April 4, 2022*&#x20;

・Material converter: Improved to preserve more values

#### 1.3.3&#x20;

*March 28, 2022*&#x20;

・Point lights: Fixed bug which stripped point lights from builds \
・Reflection: Fixed bug when used only by itself and normal map \
・Removed the menu to convert materials to OmniShade, and made this automatic on switching shaders.

**1.3.2**

*March 21, 2022*

・Added menu option to convert an existing material to use OmniShade shader.

**1.3.1**&#x20;

*March 17, 2022*

・Triplanar: Fixed bug with alpha \
・Added some tooltips

**1.3.0**

*March 14, 2022*

・Revamped UI with collapsable groups \
・Added Desaturation effect \
・Specular: Added override color\
・Reflection: Revised to work independently of Rim, and to work with lighting \
&#x20;      *This change will require existing reflections to be re-tuned*\
・Light Map: Renamed to Occlusion Map \
・Triplanar: Support for using UV texture on sides

**1.2.1**

*March 8, 2022*

・Support for Single Pass Stereo rendering in VR

**1.2.0**

*March 7, 2022*

・Renamed to OmniShade Pro

**1.1.6**

*March 7, 2022*

・Fix for outline effect in device builds

**1.1.5**&#x20;

*March 3, 2022*&#x20;

・Added Cutout Transparency support\
・Added MatCap and Lightmap color

#### 1.1.4

*February 28, 2022*

・Flat shading: Support for MatCap.\
・Specular, Rim, Emissive: Fixed light blending bug\
&#x20;      *This fix may affect existing materials*\
・Specular Hair: Fixed light visible on backside\
・Shadows: Added support for colored shadows\
・Anime: Added support for color tints\
・Added Outline feature, and removed Vertex Extrude\
・Baked lighting: Fixed bug causing baked specular to be too dim

#### 1.1.3

*February 25, 2022*

・Added Optimization Flags to assist shader stripping\
・Added Flat Shading\
・Added Specular Hair\
・Fixed UV2\
・Plant sway: Improved sway motion

#### 1.1.2

*February 23, 2022*

・MatCap: Fixed wrong calculation in perspective correction in URP\
・Plant sway: Fixed for URP\
・Fixed light baking in URP

#### 1.1.1

*February 22, 2022*

・Optimized point lights to vertex shader, with Per Pixel Point Lights toggle\
・Layers: Fix to respect layer alpha

#### 1.1.0

*February 21, 2022*

・Added support for point lights\
・Added Anime-look styling\
・Added 5 more demo scenes\
・Added OpenGL ES2 fallback, with a minimal subset of features\
・Fixed shadows not working on Unity 2021\
・Added convenience toggle to Receive Shadows in shader\
・Fixed broken Vertex Color Contrast\
・HeightColors: Added more blending modes and texture input\
・Specular: Removed Specular Color, using the main light color instead

#### 1.0.1

*February 16, 2022*

・MatCap: Fixed bug which caused it to slide with perspective camera rotation.  Also added option to disable perspective correction, and option for static rotation.\
・Detail Map: Added option to mask with vertex color alpha-channel\
・Added a fallback to Diffuse on OpenGL ES 2 devices\
・Added Ella demo scene

#### 1.0.0

*February 15, 2022*

・OmniShade released!


# Optimization Tips

* To reduce shader memory and size, be sure to configure your **Shader Stripping** settings under **Project Settings->Graphics**.  Set the **Lightmap Modes** and **Fog Modes** to only what you need.  For example, if you do not use exponential fog or baked lighting, removing them will reduce the shader size.  <mark style="color:red;">This can have a big impact on larger projects, so be sure to do this!</mark>
* In the shader file, you can remove lines starting with `#pragma multi_compile` on shader features your project doesn't need to reduce the generated variants, which significantly reduces build time and variants.  For example, `_SCREEN_SPACE_OCCLUSION` , `_LIGHT_COOKIES` , or `_LIGHT_LAYERS` , `_SHADOWS_SOFT`  and so on, see [Unity shader stripping](https://docs.unity3d.com/6000.0/Documentation/Manual/urp/shader-stripping.html). &#x20;
* <mark style="color:purple;">**(Pro feature)**</mark>**&#x20;Shader Stripping flags** are available on a per-material basis.  This is an advanced feature for larger projects I recommend touching only if you know what you are doing.  It provides hints to the shader stripping process during the build process to optimize the build size and memory of the shader.  For example, if you have Fog enabled on a project-wide setting, but then know that fog is not needed on a certain material, you can select Fog Disabled and the fog variants for that material will not be generated.  If an incompatible setting is detected, an error color will be output.  It's a good idea to make an actual build to verify the results when using these stripping flags, as they only work on builds.  That said, on a major project, these flags can help squeeze every ounce of performance.
* If your game is running slowly, the first thing to try is disabling some of the features.  OmniShade is fast, but in the sense that it calculates only the minimal it ever needs.  If you enable too many effects, it will slow down.  Also, some features are enabled by default for general usage, but every enabled feature costs a little performance so disable what you don't need.&#x20;
* On lower end devices, using many textures and layers, or the contrast settings can impact performance.  It is worth considering whether it's possible to pre-flatten the effects into fewer textures, rather than blending them in real-time in the shader.
* <mark style="color:purple;">**(Pro feature)**</mark> On OpenGL ES 2 devices, such as iPhone 5 and below, the shader falls back to a minimal subset of features, intended to preserve the original look.  You can toggle this from **Menu->Tools->OmniShade->Switch To Fallback**.  \
  If want to control this from code, you can call *OmniShade.SetNormalShader()* or *OmniShade.SetFallbackShader()*.  And if you are a little shader-savvy, you can tweak the features enabled/disabled in the fallback shader by adjusting the shader keywords.  The main limitation for OmniShade with GL ES2 is 8 interpolators (up to TEXCOORD7).
* If your project has no need to support OpenGL ES 2, you can completely remove the Fallback subshader section in the shader file to reduce the memory size.
* Finally, general Unity [drawcall batching tips](https://docs.unity3d.com/Manual/optimizing-draw-calls.html) are always good to review.


# 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 **non-PBR** **version** 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.

The **PBR version** on the other hand, 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.

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.

#### Why offer a non-Pro and Pro version, and what is the difference?

For most hobbyists and indie developers, the non-Pro version is likely all you need.  But, if you love the product and would like to support the developer (me), I do offer you that opportunity with the Pro version.  In exchange for a donation, you get a few optimizations on build size and memory, a custom fallback shader for OpenGL ES 2 devices, and a very cool [triplanar mapping shader](https://www.youtube.com/watch?v=U_K1lnhjlFI).  Rest assured, you're not missing out on much if you never go pro.  But if you hit it out of the park with your game, come back and support us with the Pro version.

#### What are MatCaps and why should I care?

[MatCaps ](https://www.youtube.com/watch?v=qPVUW1tFT-0)are popular in 3D sculpting, and are able to capture an entire environment's lighting, including all global illumination and reflections, in one texture.  More over, it is very good in performance, allowing realtime rendering of lighting and effects that would otherwise be impossible on mobile devices.  \
The only short-coming is the lighting is captured from a single angle, so even if you rotate the camera, it is as if the object were rotating in a static-lit environment instead.  However, in many games this is not particularly noticeable nor a problem.  You can [download ](https://pixologic.com/zbrush/downloadcenter/library/)more MatCaps online, and import them for use in OmniShade.

#### Spot lights aren't working?

Spot lights are supported only on URP.  For Built-In Pipeline, you can use a [Projector](https://docs.unity3d.com/Manual/class-Projector.html) to achieve nearly the same effect as the spot light.  The reason for this is due to the limitations of the built-in pipeline with stylized custom shaders.  Another technique may be to apply 2 materials to the same object, one with OmniShade and one with Standard shader for the spotlight lighting, although this requires the object to be rendered twice.

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

Yes, you can!  Learn how to [paint textures](https://www.youtube.com/watch?v=PgEv3Au6X08) using the layers.  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.

#### What is triplanar projection mapping?

[Triplanar mapping](https://www.youtube.com/watch?v=U_K1lnhjlFI) projects a texture from all 3 axises onto the mesh, relying on no UV coordinates.  This is particularly useful for 1) procedural geometry, where you cannot generate good-looking UVs 2) heightfield terrains, which have stretched UVs and would result in stretched textures, 3) modular environments, which are composed of smaller pieces but need to have an integrated look, or 4) some complex geometry you are too lazy to UV-map.  It also supports a top-side texture, so you can have snow/grass covering effect.  There are many interesting uses that can get you out of a texturing jam, I encourage you to experiment with it!

#### Objects are not rendered in the right order, or disappearing behind others.

This is due to the culling and depth settings.  There are Presets in the shader at the bottom, including: Opaque, Transparent, Additive, Transparent Additive, Opaque Cutout.  For example, transparent objects need to have Z-Write disabled and Render Queue at 3000 or higher. &#x20;

#### How can I modify the material at runtime?

Material variants are determined automatically at buildtime based on what features are enabled or disabled on the materials.  So if you are modifying a material's properties at runtime, be sure to use a non-default value for the property to ensure that it is enabled.  For example, if you are slotting in a texture by code, ensure that feature is enabled by slotting in a white texture into the material.

#### Are GPU Resident Drawers supported?

[GPU Resident Drawers](https://docs.unity3d.com/6000.0/Documentation/Manual/urp/gpu-resident-drawer.html) from Unity 6 can be easily configured, however it is not supported out of the box as it increases shader requirements from OpenGL ES 3.0 to 3.1.  To set it up, make the following changes:

1. Change the `#pragma target 3.5` line to `#pragma target 4.5` in the URP shader file.  Do this for each occurrence.
2. Add `#pragma multi_compile DOTS_INSTANCING_ON` to each shader pass.

Also ensure [GPU Resident Drawers is enabled](https://docs.unity3d.com/6000.0/Documentation/Manual/urp/gpu-resident-drawer.html).

#### Is this supported on OpenGL ES 2 devices?

On OpenGL ES 2 devices like iPhone 5 and lower, the shader falls back to a stripped down version of the features, designed to preserve the original look **(pro feature)**.  For non-pro, it fallback to the Unity Diffuse shader.  See the [Optimization Tips](/documentation/optimization-tips) for more info.

#### The point lights are popping in and out, is this a bug?

This is a known issue with custom shaders on the built-in render pipeline, and occurs when you have a directional light and 2 or more point lights.  The fix is to simply set the directional light's **Render Mode** to **Important** instead of **Auto**.

#### Materials appear to have flickering artifiacts?

In older versions, the Culling And Depth Preset for Opaque objects was improperly configured, which caused flickering on URP, particularly with HDR enabled.  You can fix the flickering by setting the SourceBlend to One, and DestBlend to Zero on opaque materials.

#### Why is the shader hogging so much memory?

Be sure to read the [Optimization Tips](/documentation/optimization-tips) section to ensure your project is configured optimally.

#### 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://www.youtube.com/watch?v=I1oLzUP8W4s>" %}

{% embed url="<https://www.youtube.com/watch?v=I1oLzUP8W4s>" %}

{% embed url="<https://www.youtube.com/watch?v=B_ynmnnJvfg>" %}

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

{% embed url="<https://www.youtube.com/watch?v=5SPnj8zSPMw>" %}

{% embed url="<https://www.youtube.com/watch?v=PgEv3Au6X08>" %}

{% embed url="<https://www.youtube.com/watch?v=U_K1lnhjlFI>" %}


# Images

![](/files/4YZ4kFXDesgjiPkh6PK0)

![](/files/Que8eDQ2DNQUjA3t3UI3)

![](/files/yrTZwOglJNsQeMAH7HPX)

![](/files/NNH3dzSyhYv5eA8NfSv5)

![](/files/ofExXegKxlbn5BUvStUH)

![](/files/R6S0cVR05l5Zd4sDrQde)

![](/files/KMVRSgciRZIG39E7Vvle)

![](/files/rCL5c005e7mFCCNEOWQc)

![](/files/gUhVRgd82aIkbwhmSmzR)

![](/files/8V73iBJtMA2fgvBYsu42)

![](/files/TNAEbpUmgCbJP2kGVzPj)

![](/files/kmLMitNmq1CSyiybbbX7)

![](/files/CwHiJM1awB9xDc7p1bJU)

![](/files/NY6q28X6ot0Iy4Zj3Vbf)

![](/files/8lTWyU4k0qdm4lqByC5E)

![](/files/E5gnfm0B129fpsNfxZLZ)

![](/files/ptN1Aknq9BMoGYGniaTU)

![](/files/O3EyBXBeQZhDODEm2pf8)

![](/files/kEjNpBDSAkXnoU5bToaj)

![](/files/0IFRcyciGOow3cOlBhFl)

![](/files/ByMzENtvodcTjSnAMHSE)

![](/files/YwYNwPLrOmlIObSbNvmU)

![](/files/VyuF2vnpO96XxQA32S82)


# Playable Demo

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

<https://simmer.io/@OmniShade/omnishade-demo> (58MB)

![](/files/UPv4cKVxkPsD3mX6Otbs)


# 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/kJtqCW44s5)


# About

The shader to rule them all

Ever thought all Unity 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

#### Have a request or technical issue?

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

<contact@omnishade.io>


