浏览代码

Update shader templates

/main
Peter Bay Bastian 7 年前
当前提交
2dacb47d
共有 5 个文件被更改,包括 193 次插入179 次删除
  1. 92
      ShaderTemplates/Add.ShaderGraph.shader
  2. 108
      ShaderTemplates/AddSubGraph.ShaderGraph.shader
  3. 72
      ShaderTemplates/Cracks.ShaderGraph.shader
  4. 92
      ShaderTemplates/Multiply.ShaderGraph.shader
  5. 8
      ShaderTemplates/TextureSample.ShaderGraph.shader

92
ShaderTemplates/Add.ShaderGraph.shader


Shader "Add"
Shader "Add"
Properties
{
Properties
{
}
SubShader
}
SubShader
Tags
{
"RenderType"="Opaque"
"Queue"="Geometry"
}
Tags
{
"RenderType"="Opaque"
"Queue"="Geometry"
}
Blend One Zero
Blend One Zero
Cull Back
Cull Back
ZTest LEqual
ZTest LEqual
ZWrite On
ZWrite On
LOD 200
CGPROGRAM
#pragma target 3.0
#pragma surface surf Standard vertex:vert
#pragma glsl
#pragma debug
LOD 200
CGPROGRAM
#pragma target 3.0
#pragma surface surf Standard vertex:vert
#pragma glsl
#pragma debug
void Unity_Add_float(float4 first, float4 second, out float4 result)
{
result = first + second;
}
void Unity_Add_float(float4 first, float4 second, out float4 result)
{
result = first + second;
}
struct Input
{
float4 color : COLOR;
};
struct Input
{
float4 color : COLOR;
void vert (inout appdata_full v, out Input o)
{
UNITY_INITIALIZE_OUTPUT(Input,o);
};
}
void surf (Input IN, inout SurfaceOutputStandard o)
{
float4 Color_Color_F01F05F2_Uniform = float4 (0.1172414, 1, 0, 0);
float4 Color_Color_3FAAF5EA_Uniform = float4 (0.01912789, -0.005136251, 0.6985294, 0);
float4 Add_1ABB2997_result;
Unity_Add_float(Color_Color_F01F05F2_Uniform, Color_Color_3FAAF5EA_Uniform, Add_1ABB2997_result);
o.Emission = Add_1ABB2997_result;
void vert (inout appdata_full v, out Input o)
{
UNITY_INITIALIZE_OUTPUT(Input,o);
}
void surf (Input IN, inout SurfaceOutputStandard o)
{
float4 Color_Color_F01F05F2_Uniform = float4 (0.1172414, 1, 0, 0);
float4 Color_Color_3FAAF5EA_Uniform = float4 (0.01912789, -0.005136251, 0.6985294, 0);
float4 Add_1ABB2997_result;
Unity_Add_float(Color_Color_F01F05F2_Uniform, Color_Color_3FAAF5EA_Uniform, Add_1ABB2997_result);
o.Emission = Add_1ABB2997_result;
}
ENDCG
}
ENDCG
FallBack "Diffuse"
CustomEditor "LegacyIlluminShaderGUI"
FallBack "Diffuse"
CustomEditor "LegacyIlluminShaderGUI"
}

108
ShaderTemplates/AddSubGraph.ShaderGraph.shader


Shader "AddSubGraph"
Shader "AddSubGraph"
Properties
{
Properties
{
}
SubShader
}
SubShader
Tags
{
"RenderType"="Opaque"
"Queue"="Geometry"
}
Tags
{
"RenderType"="Opaque"
"Queue"="Geometry"
}
Blend One Zero
Blend One Zero
Cull Back
Cull Back
ZTest LEqual
ZTest LEqual
ZWrite On
ZWrite On
LOD 200
CGPROGRAM
#pragma target 3.0
#pragma surface surf Standard vertex:vert
#pragma glsl
#pragma debug
LOD 200
CGPROGRAM
#pragma target 3.0
#pragma surface surf Standard vertex:vert
#pragma glsl
#pragma debug
void Unity_Add_float(float4 first, float4 second, out float4 result)
{
result = first + second;
}
void Unity_Add_float(float4 first, float4 second, out float4 result)
{
result = first + second;
}
struct Input
{
float4 color : COLOR;
};
struct Input
{
float4 color : COLOR;
void vert (inout appdata_full v, out Input o)
{
UNITY_INITIALIZE_OUTPUT(Input,o);
};
}
void surf (Input IN, inout SurfaceOutputStandard o)
{
float4 Color_Color_FD942667_Uniform = float4 (1, 0, 0, 0);
float4 Color_Color_C568FE2A_Uniform = float4 (0.1586208, 1, 0, 0);
// Subgraph for node SubGraph_F6FDDDC0
float4 SubGraph_F6FDDDC0_Output1 = 0;
{
float4 SubGraphInputs_23A80546_Input1 = Color_Color_FD942667_Uniform;
float4 SubGraphInputs_23A80546_Input2 = Color_Color_C568FE2A_Uniform;
float4 Add_B9CA3569_result;
Unity_Add_float(SubGraphInputs_23A80546_Input1, SubGraphInputs_23A80546_Input2, Add_B9CA3569_result);
SubGraph_F6FDDDC0_Output1 = Add_B9CA3569_result;
}
// Subgraph ends
o.Emission = SubGraph_F6FDDDC0_Output1;
void vert (inout appdata_full v, out Input o)
{
UNITY_INITIALIZE_OUTPUT(Input,o);
}
ENDCG
}
void surf (Input IN, inout SurfaceOutputStandard o)
{
float4 Color_Color_FD942667_Uniform = float4 (1, 0, 0, 0);
float4 Color_Color_C568FE2A_Uniform = float4 (0.1586208, 1, 0, 0);
// Subgraph for node SubGraph_F6FDDDC0
float4 SubGraph_F6FDDDC0_Output1 = 0;
{
float4 SubGraphInputs_23A80546_Input1 = Color_Color_FD942667_Uniform;
float4 SubGraphInputs_23A80546_Input2 = Color_Color_C568FE2A_Uniform;
float4 Add_B9CA3569_result;
Unity_Add_float(SubGraphInputs_23A80546_Input1, SubGraphInputs_23A80546_Input2, Add_B9CA3569_result);
SubGraph_F6FDDDC0_Output1 = Add_B9CA3569_result;
}
// Subgraph ends
o.Emission = SubGraph_F6FDDDC0_Output1;
}
ENDCG
FallBack "Diffuse"
CustomEditor "LegacyIlluminShaderGUI"
FallBack "Diffuse"
CustomEditor "LegacyIlluminShaderGUI"
}

72
ShaderTemplates/Cracks.ShaderGraph.shader


{
[NonModifiableTextureData] Texture2D_Texture2D_CF0DB0B2_Uniform("Texture2D", 2D) = "white" {}
[NonModifiableTextureData] Texture2D_Texture2D_D8FD66BB_Uniform("Texture2D", 2D) = "white" {}
Color_Color_B59542C3_Uniform("Color", Color) = (0,0.201217,0.9411765,0)
Vector1_Vector1_2852A57B_Uniform("Vector1", Float) = 2.75
[NonModifiableTextureData] Texture2D_Texture2D_DF8FC6BF_Uniform("Texture2D", 2D) = "white" {}

UNITY_DECLARE_TEX2D(Texture2D_Texture2D_CF0DB0B2_Uniform);
UNITY_DECLARE_TEX2D(Texture2D_Texture2D_D8FD66BB_Uniform);
float4 Color_Color_B59542C3_Uniform;
float Vector1_Vector1_2852A57B_Uniform;
UNITY_DECLARE_TEX2D(Texture2D_Texture2D_DF8FC6BF_Uniform);

{
result = first + second;
}
void Unity_Multiply_float(float first, float second, out float result)
{
result = first * second;
}
void Unity_Pow_float(float first, float second, out float result)
{
result = pow(first, second);
}
void Unity_Multiply_float(float4 first, float4 second, out float4 result)
{
result = first * second;

{
half4 uv0 = IN.meshUV0;
float3 worldSpaceNormal = normalize(IN.worldNormal);
float4 Sample2DTexture_CBB2AC98_rgba = UNITY_SAMPLE_TEX2D(Texture2D_Texture2D_CF0DB0B2_Uniform,uv0.xy);
float4 Sample2DTexture_E4154D7A_rgba = UNITY_SAMPLE_TEX2D(Texture2D_Texture2D_D8FD66BB_Uniform,uv0.xy);
float4 Sample2DTexture_CBB2AC98_RGBA = UNITY_SAMPLE_TEX2D(Texture2D_Texture2D_CF0DB0B2_Uniform,uv0.xy);
float Sample2DTexture_CBB2AC98_R = Sample2DTexture_CBB2AC98_RGBA.r;
float Sample2DTexture_CBB2AC98_G = Sample2DTexture_CBB2AC98_RGBA.g;
float Sample2DTexture_CBB2AC98_B = Sample2DTexture_CBB2AC98_RGBA.b;
float Sample2DTexture_CBB2AC98_A = Sample2DTexture_CBB2AC98_RGBA.a;
float4 Sample2DTexture_E4154D7A_RGBA = UNITY_SAMPLE_TEX2D(Texture2D_Texture2D_D8FD66BB_Uniform,uv0.xy);
float Sample2DTexture_E4154D7A_R = Sample2DTexture_E4154D7A_RGBA.r;
float Sample2DTexture_E4154D7A_G = Sample2DTexture_E4154D7A_RGBA.g;
float Sample2DTexture_E4154D7A_B = Sample2DTexture_E4154D7A_RGBA.b;
float Sample2DTexture_E4154D7A_A = Sample2DTexture_E4154D7A_RGBA.a;
Unity_UnpackNormal_float(Sample2DTexture_E4154D7A_rgba, UnpackNormal_6C531D77_normal);
float DotProduct_EE0C09EE_result;
Unity_DotProduct_float((UNITY_MATRIX_IT_MV [2].xyz.xyz), worldSpaceNormal, DotProduct_EE0C09EE_result);
float Subtract_E13D23D8_result;
Unity_Subtract_float(1, DotProduct_EE0C09EE_result, Subtract_E13D23D8_result);
float Sin_727041A3_result;
Unity_Sin_float(_Time.z, Sin_727041A3_result);
float Add_4994C002_result;
Unity_Add_float(Sin_727041A3_result, 2, Add_4994C002_result);
float Multiply_A835CC27_result;
Unity_Multiply_float(Vector1_Vector1_2852A57B_Uniform, Add_4994C002_result, Multiply_A835CC27_result);
float Power_B6C405D6_result;
Unity_Pow_float(Subtract_E13D23D8_result, Multiply_A835CC27_result, Power_B6C405D6_result);
Unity_UnpackNormal_float(Sample2DTexture_E4154D7A_RGBA, UnpackNormal_6C531D77_normal);
float4 Color_Color_B59542C3_Uniform = float4 (0.04574043, 0.6029412, 0, 0);
// Subgraph for node SubGraph_36F1FBE3
float4 SubGraph_36F1FBE3_Output1 = 0;
{
float4 SubGraphInputs_6ACBBD95_Input1 = (Vector1_Vector1_2852A57B_Uniform.xxxx);
float DotProduct_10B07FF5_result;
Unity_DotProduct_float((UNITY_MATRIX_IT_MV [2].xyz.xyz), worldSpaceNormal, DotProduct_10B07FF5_result);
float Subtract_72198B00_result;
Unity_Subtract_float(1, DotProduct_10B07FF5_result, Subtract_72198B00_result);
float Sin_4FB6BE0D_result;
Unity_Sin_float(_Time.z, Sin_4FB6BE0D_result);
float Add_716D55BE_result;
Unity_Add_float(Sin_4FB6BE0D_result, 2, Add_716D55BE_result);
float4 Multiply_E986BCF2_result;
Unity_Multiply_float(SubGraphInputs_6ACBBD95_Input1, (Add_716D55BE_result.xxxx), Multiply_E986BCF2_result);
float4 Power_A9D71705_result;
Unity_Pow_float((Subtract_72198B00_result.xxxx), Multiply_E986BCF2_result, Power_A9D71705_result);
SubGraph_36F1FBE3_Output1 = Power_A9D71705_result;
}
// Subgraph ends
Unity_Multiply_float(Color_Color_B59542C3_Uniform, (Power_B6C405D6_result.xxxx), Multiply_FC556C52_result);
float4 Sample2DTexture_9E83468E_rgba = UNITY_SAMPLE_TEX2D(Texture2D_Texture2D_DF8FC6BF_Uniform,uv0.xy);
Unity_Multiply_float(Color_Color_B59542C3_Uniform, SubGraph_36F1FBE3_Output1, Multiply_FC556C52_result);
float4 Sample2DTexture_9E83468E_RGBA = UNITY_SAMPLE_TEX2D(Texture2D_Texture2D_DF8FC6BF_Uniform,uv0.xy);
float Sample2DTexture_9E83468E_R = Sample2DTexture_9E83468E_RGBA.r;
float Sample2DTexture_9E83468E_G = Sample2DTexture_9E83468E_RGBA.g;
float Sample2DTexture_9E83468E_B = Sample2DTexture_9E83468E_RGBA.b;
float Sample2DTexture_9E83468E_A = Sample2DTexture_9E83468E_RGBA.a;
Unity_Pow_float(Sample2DTexture_9E83468E_rgba, float4 (30,30,30,30), Power_91C00DF5_result);
Unity_Pow_float(Sample2DTexture_9E83468E_RGBA, float4 (30,30,30,30), Power_91C00DF5_result);
Unity_Subtract_float(float4 (1,1,1,1), Sample2DTexture_9E83468E_rgba, Subtract_D747760F_result);
o.Albedo = Sample2DTexture_CBB2AC98_rgba;
Unity_Subtract_float(float4 (1,1,1,1), Sample2DTexture_9E83468E_RGBA, Subtract_D747760F_result);
o.Albedo = Sample2DTexture_CBB2AC98_RGBA;
o.Metallic = Sample2DTexture_9E83468E_rgba;
o.Metallic = Sample2DTexture_9E83468E_RGBA;
o.Smoothness = Subtract_D747760F_result;
}

92
ShaderTemplates/Multiply.ShaderGraph.shader


Shader "Multiply"
Shader "Multiply"
Properties
{
Properties
{
}
SubShader
}
SubShader
Tags
{
"RenderType"="Opaque"
"Queue"="Geometry"
}
Tags
{
"RenderType"="Opaque"
"Queue"="Geometry"
}
Blend One Zero
Blend One Zero
Cull Back
Cull Back
ZTest LEqual
ZTest LEqual
ZWrite On
ZWrite On
LOD 200
CGPROGRAM
#pragma target 3.0
#pragma surface surf Standard vertex:vert
#pragma glsl
#pragma debug
LOD 200
CGPROGRAM
#pragma target 3.0
#pragma surface surf Standard vertex:vert
#pragma glsl
#pragma debug
void Unity_Multiply_float(float4 first, float4 second, out float4 result)
{
result = first * second;
}
void Unity_Multiply_float(float4 first, float4 second, out float4 result)
{
result = first * second;
}
struct Input
{
float4 color : COLOR;
};
struct Input
{
float4 color : COLOR;
void vert (inout appdata_full v, out Input o)
{
UNITY_INITIALIZE_OUTPUT(Input,o);
};
}
void surf (Input IN, inout SurfaceOutputStandard o)
{
float4 Color_Color_E181B4C8_Uniform = float4 (1.022059, 1.022059, 1.022059, 0);
float4 Color_Color_8AFF9DED_Uniform = float4 (1.007353, -0.01481403, -0.01481403, 0);
float4 Multiply_91E1EE9F_result;
Unity_Multiply_float(Color_Color_E181B4C8_Uniform, Color_Color_8AFF9DED_Uniform, Multiply_91E1EE9F_result);
o.Emission = Multiply_91E1EE9F_result;
void vert (inout appdata_full v, out Input o)
{
UNITY_INITIALIZE_OUTPUT(Input,o);
}
void surf (Input IN, inout SurfaceOutputStandard o)
{
float4 Color_Color_E181B4C8_Uniform = float4 (1.022059, 1.022059, 1.022059, 0);
float4 Color_Color_8AFF9DED_Uniform = float4 (1.007353, -0.01481403, -0.01481403, 0);
float4 Multiply_91E1EE9F_result;
Unity_Multiply_float(Color_Color_E181B4C8_Uniform, Color_Color_8AFF9DED_Uniform, Multiply_91E1EE9F_result);
o.Emission = Multiply_91E1EE9F_result;
}
ENDCG
}
ENDCG
FallBack "Diffuse"
CustomEditor "LegacyIlluminShaderGUI"
FallBack "Diffuse"
CustomEditor "LegacyIlluminShaderGUI"
}

8
ShaderTemplates/TextureSample.ShaderGraph.shader


void surf (Input IN, inout SurfaceOutputStandard o)
{
half4 uv0 = IN.meshUV0;
float4 Sample2DTexture_1EF145E2_rgba = UNITY_SAMPLE_TEX2D(Texture2D_Texture2D_ED131035_Uniform,uv0.xy);
o.Emission = Sample2DTexture_1EF145E2_rgba;
float4 Sample2DTexture_1EF145E2_RGBA = UNITY_SAMPLE_TEX2D(Texture2D_Texture2D_ED131035_Uniform,uv0.xy);
float Sample2DTexture_1EF145E2_R = Sample2DTexture_1EF145E2_RGBA.r;
float Sample2DTexture_1EF145E2_G = Sample2DTexture_1EF145E2_RGBA.g;
float Sample2DTexture_1EF145E2_B = Sample2DTexture_1EF145E2_RGBA.b;
float Sample2DTexture_1EF145E2_A = Sample2DTexture_1EF145E2_RGBA.a;
o.Emission = Sample2DTexture_1EF145E2_RGBA;
}
ENDCG

正在加载...
取消
保存