Skip to content

BaseGUI

Matt Dean edited this page Jan 28, 2020 · 2 revisions

The base abstract shader for ShaderGUI used in kShading. This class handles the default foldouts, drawing Surface Options and Advanced Options, and setting common material keywords.

Public Enumerations

BlendMode (Alpha, Premultiply, Additive, Multiply) - Blend mode enumeration for shaders.

SurfaceType (Opaque, Transparent) - Surface type enumeration for shaders.

WorkflowMode (Specular, Metallic) - Workflow mode (specular/metallic) enumeration for shaders.

RenderFace (Front, Back, Both) - Culling enumeration for shaders.

Public Methods

GetProperties

return void

Get MaterialProperty fields during OnGUI call.

Argument Type Description
properties MaterialProperty[] >MaterialProperty array to access.

DrawSurfaceInputs

return void

Draw MaterialProperty fields within the Surface Inputs foldout.

Argument Type Description
materialEditor MaterialEditor MaterialEditor currently drawing.

DrawCustom

return void

Draw custom GUI after all foldouts.

Argument Type Description
materialEditor MaterialEditor MaterialEditor currently drawing.

SetMaterialKeywords

return Decal

Set Material keywords when changes are made during OnGUI call.

Argument Type Description
material Material Material target of current MaterialEditor.