Page cover image


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, while OmniShade 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, 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. 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 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 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 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 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 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.

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.

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 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 section to ensure your project is configured optimally.

Can I use this shader in my commercial game?

Absolutely! No attribution is required, although appreciated.

Last updated