It always felt awkward that we depended so much on Valve's internal shading code to compile shaders, you'd have broken intellisense, would have to rely on private, undocumented methods, wasn't a fun time.
This month I've rewrote all the base surface shading code from scratch for addon shaders, this makes shader authoring much more straightforward, it uses the support for classes and inheritance on VFX that we talked about last month.
Shaders that use our previous Material API should be backwards compatible with it, it'll use StandarMaterialShading which works the same as the previous Valve-based shading, and should compile much faster too!
If you want to make your own you just have to inherit and obey the simple ShadingModel contract and our internals deal with the rest.

attribute 'contenteditable' not allowedattribute 'blocktype' not allowed
As an example on how to use it in various ways, I've added a simple Toon shader to show how to expand and create your own shading model without basing it on the Standard Surface Shading.

attribute 'contenteditable' not allowedattribute 'blocktype' not allowed
In the future the plan is to unify and replace Standard and Complex using this new shading model base.
Comments