Skip to content
z3y edited this page Jan 25, 2022 · 7 revisions

Shader Features

  • Accurate PBR Shading - Uses a pre-calculated lookup texture for the environment BRFD. This gives much more accurate results for reflections and fixes the high amount of fresnel that the Standard shader has.

  • Packed Mask - Packed Texture that contains four grayscale textures: Metallic (Red), Occlusion (Green), Detail Mask (Blue), Smoothness (Alpha). Tools for packing textures: Smart Texture, Texture Utility or use the tool in the inspector

  • Normal Map

  • Detail Map Similar to HDRP/Lit but uses one Abledo(RGB) + Smoothnes (A) texture instead of the desaturated albedo with blend mode overlay and one normal map texture

  • Geometric Specular AA - Remove specular shimmering on hard edges

  • Specular Occlusion - Removes fresnel from reflections on dark parts of the lightmap

  • Bicubic Lightmap - Enabled by default in the config. Bicubic sampling for a smoothner lightmap

  • Baked Specular - Enables specular highlights if used with Directional, SH or RNM lightmap mode, or get specular from light probes if the object is not static

  • Antialiased Cutout - Used in cutout mode, instead of the default cutout mode that standard uses. Requires Multisample anti-aliasing. For MSAA to work in unity scene view you need a post processing layer script. Makes edges of a cutout material smoother

  • Bakery SH and RNM - After baking is done a script will automatically change it on all materials in the scene using this shader. Requiers Udon Bakery Adapter to work in VRChat.

Advanced

  • Instanced properties: Properties that can be changed with material blocks without creating more draw calls: _EmissionColor, _Color, _MainTex_ST and _TextureIndex for Tex2DArrays.

  • Tex2DArray Workflow - Uses UV0 Z coordinate for the array index. Meshes do not need to be generated with new uv data. If meshes are static unity will combine them before build and it keeps the modified UV data. Array instancing using instanced float named _TextureIndex, make sure to also enable GPU instancing. Scripts for setting the array index included in scripts folder on github (not in the unity package). For instanced arrays drop the prefab in the scene and on build it will take all values from the C# scripts and handle them on start with one udon behaviour. If building for multiple platforms be sure to compress 2D arrays again for the target platform. Unity does not handle this automatically and it can lead to huge performance issues. Recommended tool that handles this properly and automatically https://github.com/pschraut/UnityTexture2DArrayImportPipeline . This workflow isnt very standardized, hard to explain and might change since its maninly there because I use it. It's meant to solve the problem of having different textures on non-static objects in one draw call and to be used as an alternative to atlasing while still being able to tile textures. This can also be achieved by packing them all in an texture atlas and using the instanced ST property in this shader.

Clone this wiki locally