Home

Awesome

Juan Shader&GraphGUI

Image description

Efficient GUI for both ShaderLab and ShaderGraph

Discord Join us on Discord

Consider this page as text instructions

If prefer a video tutorial, you can find it here:

English:

中文:

Or you can find a simple cheat sheet inside the package. Use it alongsidethe demo materials to learn all syntax usage

Want to see new features of the latest version? Please refer to CHANGELOG.

Notes



Download

Download from Asset Store

Manually Download


Getting Started

Installing on Shader

Add CustomEditor "JuanShaderGUI" to the end of your shader file

Image description

Installing on Shader Graph

Add JuanShaderGraph to Custom Editor GUI under Graph Inspector -> Graph Settings

Image description


Shader

Folder

SyntaxDrawer
[Folder(Folder Name)]Folder
[Folder(Folder Name, True)]Folder Always Open
[Folder(Folder Name, _ Property /_KEYWORD)]Folder with Property/Keyword (Condition Unspecified) (On/1.0/Not-Null as True)
[Folder(Folder Name, _Property/_KEYWORD, Condition)]Folder with Property/Keyword (Condition Specified) (On/Off, float)
[Folder(Simple Folder)]

[Texture(_Color)]_MainTex ("Albedo (RGB)", 2D) = "white" {}
[HideInInspector]_Color ("Color", Color) = (1,1,1,1)

[Folder(Nested Folder Style)]
[Close(Nested Folder Style)]

[Close(Simple Folder)]

[Folder(Always Open Folder, True)]
[Toggle]_ShowFolder1("Show Folder 1", Float) = 1.0
[Toggle(_SHOW_BLOCK_TWO)]_HideFolder2("Hide Folder 2", Float) = 1.0 
[Toggle(_SHOW_BLOCK_THREE)]_OpenFolder3("Show Folder 3", Float) = 1.0 
[Toggle(_SHOW_BLOCK_FOUR)]_HideFolder4("Hide Folder 4", Float) = 1.0 
[Texture]_AssignTexToShowFolder5("Assign to Show Folder 5", 2D) = "white"{}
_MakeFloat3ToShowFolder6("Make This Float 3.0 to Show Folder 6", Float) = 1.0
[Close]

[Folder(Condition Folder 1, _ShowFolder1, 1.0)]
[Close]

[Folder(Condition Folder 2, _HideFolder2, OFF)]
[Close]

[Folder(Condition Folder 3, _SHOW_BLOCK_THREE)]
[Close]

[Folder(Condition Folder 4, _SHOW_BLOCK_FOUR, OFF)]
[Close]

[Folder(Condition Folder 5, _AssignTexToShowFolder5)]
[Close]

[Folder(Condition Folder 6, _MakeFloat3ToShowFolder6, 3.0)]
[Close]

How to read it ?

When we find [Folder] syntax, then look for the corresponding [Close] syntax, these two work together to form a complete folder

We can also put a (folder name) after Close to manually pair them up for readability

Image description

ConditionFolder

SyntaxDrawer
[ConditionFolder(_Property/_KEYWORD)]Condition Folder
[ConditionFolder(_Property/_KEYWORD, Condition)]Condition Folder with Condition (On/Off, float)
[Folder(Condition, True)]
[Toggle]_Boolean("Show Folder 1 with Toggle", Float) = 0.0
[Toggle(_SHADER_FEATURE_TWO)]_HideFolder2("Hide Folder 2 with KEYWORD", Float) = 0.0
[Texture]_AssignToShowFolder3("Hide Folder 3 with Texture", 2D) = "white"{}
[Close]

[ConditionFolder(_Boolean)]
_Color1("Color1", Color) = (1,1,1,1)
[Close]

[ConditionFolder(_SHADER_FEATURE_TWO, OFF)]
_Color2("Color2", Color) = (1,1,1,1)
[Close]

[ConditionFolder(_AssignToShowFolder3, OFF)]
_Color3("Color3", Color) = (1,1,1,1)
[Close]

_Float("Float", Range(0, 1)) = 0

Image description

ConditionBlock

FeatureFolder

SyntaxDrawer
[FeatureFolder(Folder Name, _KEYWORD)]Feature Folder
[FeatureFolder(Feature Folder One, _SHADER_FEATURE_ONE)]
_Color_One("Color One", Color) = (1,1,1,1)
[Close]

[FeatureFolder(Feature Folder Two, _SHADER_FEATURE_TWO)]
_Color_Two("Color Two", Color) = (1,1,1,1)
[Close]

Image description

Texture

SyntaxDrawer
[Texture]Thumbnail Texture
[Texture(_Property)]Texture with Inline Property
[Texture(#_Property)]Texture with Hide-If-Null Property (Also works in other variants with property)
[Texture(##_Property)]Texture with Hide-If-Not-Null Property
[Texture(_ColorName, HDR)]Texture with HDR Color
[Texture(_KEYWORD)]Texture with Keyword
[Texture(_Property, _KEYWORD)]Texture with Prop, Keyword
[Texture(_ColorName, _KEYWORD, HDR)]Texture with Prop, Keyword, HDR
[Texture]_CommonTex("Common Texture", 2D) = "white"{}

[Texture(_Color)]_MainTex ("Albedo (RGB)", 2D) = "white" {}
[HideInInspector]_Color ("Color", Color) = (1,1,1,1)

[Texture(#_HDRColor, HDR)]_TexWithHDR ("Texture with HDR", 2D) = "white" {}
[HideInInspector]_HDRColor ("HDR Color", Color) = (1,1,1,1)

[Texture(_FloatAfterTex)]_TexWithFloat("Texture with Float", 2D) = "white"{}
[HideInInspector]_FloatAfterTex("Float After Texture", Range(0, 1)) = 0.0

[Texture(#_VectorAfterTex)]_TexWithVector("Texture with Vector", 2D) = "white"{}
[HideInInspector]_VectorAfterTex("Vector After Texture", Vector) = (0,0,0,0)

[Texture(_SHADER_FEATURE)]_TexWithKeyword("Texture with Keyword", 2D) = "white"{}

Image description

Remapping

SyntaxDrawer
[Remapping]_FloatMinMaxRemapping with three Floats
[Remapping]_VectorPropertyRemapping with Vector (Only x, y are used)
[Remapping]_FloatRemap ("Float Remapping", Float) = 1.0
[HideInInspector]_FloatRemapMax ("Float Remap Max",Float) = 5.0
[HideInInspector]_FloatRemapMin ("Float Remap Min",Float) = 0.0

[Remapping]_VectorRemap("Vector Remapping", Vector) = (-1,2,0,0)

Image description

QuickSlider

SyntaxDrawer
[QuickSlider]QuickSlider
[QuickSlider(0, 5)]QuickSlider with Range
[QuickSlider(0, 5, Int)]QuickSlider Int
[QuickSlider(0.0, 5.0)]_QuickSlider("Quick Slider", Float) = 1.0
[QuickSlider]_QuickSliderDefault("Quick Slider Default", Float) = 1.0
[QuickSlider(0, 5, Int)]_QuickSliderInt("Quick Slider Int", Float) = 1.0

Image description

Vector

SyntaxDrawer
[Vector2]Vector2
[Vector3]Vector3
[Vector4]Vector4
[Vector4]_Vector4("Vector4", Vector) = (1,0,0,0)
[Vector3]_Vector3("Vector3", Vector) = (1,0,0,0)
[Vector2]_Vector2("Vector2", Vector) = (1,0,0,0)

Image description

TextField

SyntaxDrawer
[Text(Enter your text here #n to change new line, type)]Text (type: label/info/warning/error)
[Text(Enter your text here)]Text without type (label by default)
[Text(Also demonstrates space and separator, Label)]
[Folder(Text Field)]
[Text(Text Folder #n Label, Label)]
[Text(Text Folder #n Info, Info)]
[Text(Text Folder #n Warning, Warning)]
[Text(Text Folder #n Error, Error)]
[Close]

Image description

[Text(Thats how it looks like ouside #n Sadly in Thats I can not put a single quote after That)]
[Text(Text Folder #n Info, Info)]
[Text(Text Folder #n Warning, Warning)]
[Text(Text Folder #n Error, Error)]

Image description

Space & Separator

SyntaxDrawer
[EmptySpace]EmptySpace 10.0f by default
[Separator]Separator 1.0f by default
[EmptySpace(20)]EmptySpace with Height
[Separator(5)]Separator with Height
...
[Separator(2)]_Float1("Float1", Range(0, 1)) = 0.0
...
...
...
[EmptySpace]_Float("Float", Range(0, 1)) = 0.0

Image description

ShaderGUI Demo

Image description


Shader Graph

Folder

SyntaxDrawer
[$]Folder NameFolder
[$(True)]Folder NameFolder Always Open
[$(_Property/_KEYWORD)]Folder NameFolder with Property/Keyword (On/1.0/Not-Null as True)
[$(!_Property/_KEYWORD)]Folder NameFolder with Invert Property/Keyword(Off/0.0/Null as True)
[$(_Property/_KEYWORD,Condition)]Folder NameFolder with Property/Keyword (Condition Specified) (On/Off, float)

Image description

Image description

ConditionFolder

SyntaxDrawer
[?(_Property/_KEYWORD)]Random NameCondition Folder
[?(!_Property/_KEYWORD)]Random NameCondition Folder Invert
[?(_Property/_KEYWORD, Condition)]Random NameCondition Folder with Condition (On/Off, Float)

Image description

Image description

ConditionBlock

SyntaxDrawer
[!(_Property/_KEYWORD)]Random NameCondition Block
[!(!_Property/_KEYWORD)]Random NameCondition Block Invert
[!(_Property/_KEYWORD, Condition)]Random NameCondition Block with Condition (On/Off, Float)

FeatureFolder

SyntaxDrawer
[+]Shader Feature NameFeature Folder

Image description

Image description

Texture

SyntaxDrawer
Texture will be Thumbnail by defaultThumbnail Texture
&_InlinePropertyTexture with Inline Property
&&_InlinePropertyTexture with Hide-If-Null Property (Also works in other variants with property)
&!_InlinePropertyTexture with Hide-If-Not-Null Property
&_BOOLEANKEYWORDTexture with Keyword

Image description

Image description

Remapping

SyntaxDrawer
~VectorNameRemapping (Use Default Value as Range)

Image description

Image description

Vector

SyntaxDrawer
@2VectorNameVector2
@3VectorNameVector3
@4VectorNameVector4

Image description

Image description

ScaleOffset

SyntaxDrawer
#VectorNameScaleOffset

Image description

Image description

TextField

SyntaxDrawer
[*(Enter your text here #n to change new line, type)]Text (type: label/info/warning/error)
[*(Enter your text here)]Text without type (label by default)

Image description

Image description

Space & Separator

SyntaxDrawer
^Random NameSeparator
%Random NameSpace
^(float)Random NameSeparator with Height
%(float)Random NameSpace with Height

Image description

Image description

ShaderGraphGUI Demo

Image description

Image description

Surface Options & Advanced Options

Surface Options Properties

PropertyDrawer
_WorkflowModeWorkflow Mode
_SurfaceSurface Type
_BlendBlend Mode
_CullRender Face
_SrcBlend\
_DstBlend\
_ZWriteControlDepth Write
_ZWrite\
_ZTestDepth Test
_AlphaClipAlpha Clipping
_Cutoff\
_ReceiveShadowsReceive Shadows
_CastShadowsCast Shadows

Advanced Options Properties

PropertyDrawer
_SpecularHighlightsSpecular Highlights
_EnvironmentReflectionsEnvironment Reflections
_QueueControlQueue Control
_QueueOffsetSorting Priority
_EMISSION (Use this keyword to enable)Global Illumination

Keywords

Follow the naming convention below if want to properly enable corresponding features

Image description

Image description

License

This work is licensed under MIT License.