top of page
Search

Custom PBR Surface Shader with Unity Inspector

Chris Leu

At MasterpieceVR, I was tasked with creating a bespoke surface shader, supporting all the expected maps from the standard shader, with support for further revisions. Many of the revisions have been stripped out so that I can share this code, but the example final parameter multiply is still present.


With performance coming first and foremost for this VR title, I extensively implemented multi-compile options for parts of the shader not being used, for example models without normal maps simply won't process or sample the empty value, skipping it entirely. This lets the shader only process the data that is actually present.



Furthermore, we can use a simple shader inspector to remove any parameters that aren't in use, cleaning up an otherwise very busy material inspector.


8 views0 comments

Recent Posts

See All

Commentaires


bottom of page