diff options
| author | yum <yum.food.vr@gmail.com> | 2023-01-29 18:33:10 -0800 |
|---|---|---|
| committer | yum <yum.food.vr@gmail.com> | 2023-01-29 18:34:02 -0800 |
| commit | c1019adc04e7ca10b1e42751224ff0e885d6bb34 (patch) | |
| tree | bf0fe0e53a15a254e66189690939000a78ab20c4 /Shaders/PBS.shader | |
| parent | 3f4b2aa5548d1fb15cde1e8f83cda64637c55014 (diff) | |
Check in PBS, a very minimal physically-based shader
Strip out everything except the PBS bits from the TaSTT shader and put
them into a standalone shader.
Diffstat (limited to 'Shaders/PBS.shader')
| -rw-r--r-- | Shaders/PBS.shader | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/Shaders/PBS.shader b/Shaders/PBS.shader new file mode 100644 index 0000000..ddcfd1f --- /dev/null +++ b/Shaders/PBS.shader @@ -0,0 +1,62 @@ +Shader "TaSTT/Simple_PBS"
+{
+ Properties
+ {
+ [MaterialToggle] BG_Enable("Enable custom background", float) = 0
+ BG_BaseColor("Background base color", 2D) = "black" {}
+ [NoScaleOffset] BG_NormalMap ("Background normal map", 2D) = "bump" {}
+ BG_NormalStrength ("Background normal strength", Float) = 1
+ BG_Smoothness("Background smoothness", 2D) = "black" {}
+ [MaterialToggle]BG_Smoothness_Invert("Invert background smoothness", float) = 1
+ BG_Metallic("Background metallic", 2D) = "black" {}
+ BG_Emission_Mask("Background emission mask", 2D) = "black" {}
+ BG_Emission_Color("Background emission color", Color) = (0, 0, 0)
+
+ // %TEMPLATE__UNITY_ROW_COL_PARAMS%
+ }
+ SubShader
+ {
+ Pass {
+ Tags {
+ "RenderType"="Opaque"
+ "Queue"="AlphaTest+499"
+ "LightMode" = "ForwardBase"
+ }
+ Blend SrcAlpha OneMinusSrcAlpha
+
+ CGPROGRAM
+ #pragma target 3.0
+
+ #pragma multi_compile _ VERTEXLIGHT_ON
+
+ #pragma vertex vert
+ #pragma fragment frag
+
+ #define FORWARD_BASE_PASS
+
+ #include "PBS_lighting.cginc"
+ ENDCG
+ }
+ Pass {
+ Tags {
+ "RenderType" = "Opaque"
+ "LightMode" = "ForwardAdd"
+ "Queue"="AlphaTest+499"
+ }
+ Blend One One
+ ZWrite Off
+
+ CGPROGRAM
+ #pragma target 3.0
+
+ #pragma multi_compile_fwdadd
+
+ #pragma vertex vert
+ #pragma fragment frag
+
+ #include "PBS_lighting.cginc"
+ ENDCG
+ }
+ }
+}
+
|
