您最多选择25个主题 主题必须以中文或者字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
 
 
 
 

469 行
15 KiB

%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!48 &4819548
Shader:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name: SImple
m_Script: "Shader \"Graphs/Dummy\" {\nProperties {\n _Color (\"Main Color\", Color)
= (1,1,1,0)\n}\nSubShader { \n Tags { \"QUEUE\"=\"Transparent\" }\n Pass {\n Tags
{ \"LIGHTMODE\"=\"Vertex\" \"QUEUE\"=\"Transparent\" }\n ZWrite Off\n Blend
One One\n ColorMask RGB\n GpuProgramID 50736\nProgram \"vp\" {\n}\nProgram \"fp\"
{\n}\n }\n}\n}"
m_PathName:
decompressedSize: 0
m_SubProgramBlob:
m_Dependencies: []
m_ShaderIsBaked: 0
errors: []
m_DefaultTextures: {}
m_CompileInfo:
m_Snippets:
50736:
m_Code: "#pragma vertex vert\n#pragma fragment frag\n#include \"UnityShaderVariables.cginc\"\n#pragma
multi_compile_fog\n#include \"UnityCG.cginc\"\n#define USING_FOG (defined(FOG_LINEAR)
|| defined(FOG_EXP) || defined(FOG_EXP2))\n\n// ES2.0/WebGL/3DS can not
do loops with non-constant-expression iteration counts :(\n#if defined(SHADER_API_GLES)\n
\ #define LIGHT_LOOP_LIMIT 8\n#elif defined(SHADER_API_N3DS)\n #define
LIGHT_LOOP_LIMIT 4\n#else\n #define LIGHT_LOOP_LIMIT unity_VertexLightParams.x\n#endif\n#define
ENABLE_SPECULAR (!defined(SHADER_API_N3DS))\n\n// Compile specialized variants
for when positional (point/spot) and spot lights are present\n#pragma multi_compile
__ POINT SPOT\n\n// Compute illumination from one light, given attenuation\nhalf3
computeLighting (int idx, half3 dirToLight, half3 eyeNormal, half3 viewDir,
half4 diffuseColor, half shininess, half atten, inout half3 specColor) {\n
\ half NdotL = max(dot(eyeNormal, dirToLight), 0.0);\n // diffuse\n half3
color = NdotL * diffuseColor.rgb * unity_LightColor[idx].rgb;\n return
color * atten;\n}\n\n// Compute attenuation & illumination from one light\nhalf3
computeOneLight(int idx, float3 eyePosition, half3 eyeNormal, half3 viewDir,
half4 diffuseColor, half shininess, inout half3 specColor) {\n float3 dirToLight
= unity_LightPosition[idx].xyz;\n half att = 1.0;\n #if defined(POINT)
|| defined(SPOT)\n dirToLight -= eyePosition * unity_LightPosition[idx].w;\n
\ // distance attenuation\n float distSqr = dot(dirToLight, dirToLight);\n
\ att /= (1.0 + unity_LightAtten[idx].z * distSqr);\n if (unity_LightPosition[idx].w
!= 0 && distSqr > unity_LightAtten[idx].w) att = 0.0; // set to 0 if outside
of range\n dirToLight *= rsqrt(distSqr);\n #if defined(SPOT)\n //
spot angle attenuation\n half rho = max(dot(dirToLight, unity_SpotDirection[idx].xyz),
0.0);\n half spotAtt = (rho - unity_LightAtten[idx].x) * unity_LightAtten[idx].y;\n
\ att *= saturate(spotAtt);\n #endif\n #endif\n att *= 0.5; //
passed in light colors are 2x brighter than what used to be in FFP\n return
min (computeLighting (idx, dirToLight, eyeNormal, viewDir, diffuseColor,
shininess, att, specColor), 1.0);\n}\n\n// uniforms\nhalf4 _Color;\nint4
unity_VertexLightParams; // x: light count, y: zero, z: one (y/z needed
by d3d9 vs loop instruction)\nfloat4 _Dummy_ST;\n\n// vertex shader input
data\nstruct appdata {\n float3 pos : POSITION;\n float3 normal : NORMAL;\n
\ float3 uv0 : TEXCOORD0;\n};\n\n// vertex-to-fragment interpolators\nstruct
v2f {\n fixed4 color : COLOR0;\n float2 uv0 : TEXCOORD0;\n #if USING_FOG\n
\ fixed fog : TEXCOORD1;\n #endif\n float4 pos : SV_POSITION;\n};\n\n//
vertex shader\nv2f vert (appdata IN) {\n v2f o;\n half4 color = half4(0,0,0,1.1);\n
\ float3 eyePos = mul (UNITY_MATRIX_MV, float4(IN.pos,1)).xyz;\n half3
eyeNormal = normalize (mul ((float3x3)UNITY_MATRIX_IT_MV, IN.normal).xyz);\n
\ half3 viewDir = 0.0;\n // lighting\n half3 lcolor = half4(0,0,0,1).rgb
+ _Color.rgb * glstate_lightmodel_ambient.rgb;\n half3 specColor = 0.0;\n
\ half shininess = 0 * 128.0;\n for (int il = 0; il < LIGHT_LOOP_LIMIT;
++il) {\n lcolor += computeOneLight(il, eyePos, eyeNormal, viewDir, _Color,
shininess, specColor);\n }\n color.rgb = lcolor.rgb;\n color.a = _Color.a;\n
\ o.color = saturate(color);\n // compute texture coordinates\n o.uv0
= IN.uv0.xy * _Dummy_ST.xy + _Dummy_ST.zw;\n // fog\n #if USING_FOG\n
\ float fogCoord = length(eyePos.xyz); // radial fog distance\n UNITY_CALC_FOG_FACTOR(fogCoord);\n
\ o.fog = saturate(unityFogFactor);\n #endif\n // transform position\n
\ o.pos = mul(UNITY_MATRIX_MVP, float4(IN.pos,1));\n return o;\n}\n\n//
textures\nsampler2D _Dummy; // not in shader properties, assuming 2D\n\n//
fragment shader\nfixed4 frag (v2f IN) : SV_Target {\n fixed4 col;\n fixed4
tex, tmp0, tmp1, tmp2;\n // SetTexture #0\n tex = tex2D (_Dummy, IN.uv0.xy);\n
\ col.rgb = IN.color;\n col *= 2;\n col.a = IN.color.a;\n // fog\n #if
USING_FOG\n col.rgb = lerp (unity_FogColor.rgb, col.rgb, IN.fog);\n #endif\n
\ return col;\n}\n\n// texenvs\n//! TexEnv0: 02030000 01070004 [_Dummy]\n"
m_AssetPath:
m_PlatformMask: 4294967295
m_TypesMask: 3
m_IncludesHash:
serializedVersion: 2
Hash: 00000000000000000000000000000000
m_IsGLSL: 0
m_FromOther: 0
m_VariantsUser0:
- - _
- FOG_LINEAR
- FOG_EXP
- FOG_EXP2
- - _
- POINT
- SPOT
m_VariantsUser1:
- - _
- FOG_LINEAR
- FOG_EXP
- FOG_EXP2
- - _
- POINT
- SPOT
m_VariantsUser2: []
m_VariantsUser3: []
m_VariantsUser4: []
m_VariantsUser5: []
m_VariantsBuiltin0: []
m_VariantsBuiltin1: []
m_VariantsBuiltin2: []
m_VariantsBuiltin3: []
m_VariantsBuiltin4: []
m_VariantsBuiltin5: []
m_Target: 0
m_TargetVariants0: []
m_TargetVariants1: []
m_TargetVariants2: []
m_TargetVariants3: []
m_TargetVariants4: []
m_TargetVariants5: []
m_NonStrippedUserKeywords: FOG_EXP FOG_EXP2 FOG_LINEAR POINT SPOT
m_BuiltinKeywords:
m_MeshComponentsFromSnippets: 0
m_HasSurfaceShaders: 0
m_HasFixedFunctionShaders: 1
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: ef5b9f0785847b04983f907c7f016a36, type: 3}
m_Name: SimpleGraph
m_EditorClassIdentifier:
m_MaterialProperties: {fileID: 11464382}
m_MaterialOptions: {fileID: 11415370}
m_PixelGraph: {fileID: 11434580}
m_Shader: {fileID: 4819548}
--- !u!114 &11415036
MonoBehaviour:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 38072936174514040b3e08813a3ec4e7, type: 3}
m_Name: PixelMaster
m_EditorClassIdentifier:
m_Slots:
- type: 0
m_Title: Albedo
m_Name: Albedo
m_DataTypeString:
- type: 0
m_Title: Normal
m_Name: Normal
m_DataTypeString:
- type: 0
m_Title: Specular
m_Name: Specular
m_DataTypeString:
- type: 0
m_Title: Emission
m_Name: Emission
m_DataTypeString:
- type: 0
m_Title: Metallic
m_Name: Metallic
m_DataTypeString:
- type: 0
m_Title: Smoothness
m_Name: Smoothness
m_DataTypeString:
- type: 0
m_Title: Occlusion
m_Name: Occlusion
m_DataTypeString:
- type: 0
m_Title: Alpha
m_Name: Alpha
m_DataTypeString:
m_Properties: []
m_GenericTypeString:
color: 0
style: node
position:
serializedVersion: 2
x: 660
y: -108
width: 310
height: 445
showEmptySlots: 1
m_SlotDefaultValues:
- m_DefaultVector: {x: 1, y: 1, z: 1, w: 1}
m_Editable: 1
m_SlotName: Albedo
m_Node: {fileID: 11415036}
- m_DefaultVector: {x: 1, y: 1, z: 1, w: 1}
m_Editable: 1
m_SlotName: Normal
m_Node: {fileID: 11415036}
- m_DefaultVector: {x: 1, y: 1, z: 1, w: 1}
m_Editable: 1
m_SlotName: Specular
m_Node: {fileID: 11415036}
- m_DefaultVector: {x: 1, y: 1, z: 1, w: 1}
m_Editable: 1
m_SlotName: Emission
m_Node: {fileID: 11415036}
- m_DefaultVector: {x: 1, y: 1, z: 1, w: 1}
m_Editable: 1
m_SlotName: Metallic
m_Node: {fileID: 11415036}
- m_DefaultVector: {x: 1, y: 1, z: 1, w: 1}
m_Editable: 1
m_SlotName: Smoothness
m_Node: {fileID: 11415036}
- m_DefaultVector: {x: 1, y: 1, z: 1, w: 1}
m_Editable: 1
m_SlotName: Occlusion
m_Node: {fileID: 11415036}
- m_DefaultVector: {x: 1, y: 1, z: 1, w: 1}
m_Editable: 1
m_SlotName: Alpha
m_Node: {fileID: 11415036}
m_PrecisionNames:
- half
m_LightFunctionClassName: UnityEditor.MaterialGraph.PBRMetalicLightFunction
--- !u!114 &11415370
MonoBehaviour:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: edd99bcf0936ee84794c384dffae5501, type: 3}
m_Name:
m_EditorClassIdentifier:
m_SrcBlend: 0
m_DstBlend: 1
m_CullMode: 0
m_ZTest: 2
m_ZWrite: 0
m_RenderQueue: 1
m_RenderType: 0
m_ShadowPass: 0
m_FullForwardShadows: 0
m_NoAmbient: 0
m_NoVertexLights: 0
m_NoLightmaps: 0
m_NoDirLightmap: 0
m_NoForwardAdd: 0
m_ApproxView: 0
m_HalfAsView: 0
--- !u!114 &11422740
MonoBehaviour:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: f34a640000e664d4f8b2e0795df7fad9, type: 3}
m_Name: V4Node
m_EditorClassIdentifier:
m_Slots:
- type: 1
m_Title: Value
m_Name: Value
m_DataTypeString:
m_Properties: []
m_GenericTypeString:
color: 0
style: node
position:
serializedVersion: 2
x: 372
y: 132
width: 178
height: 80
showEmptySlots: 1
m_SlotDefaultValues:
- m_DefaultVector: {x: 1, y: 1, z: 1, w: 1}
m_Editable: 1
m_SlotName: Value
m_Node: {fileID: 11422740}
m_PrecisionNames:
- half
m_BoundProperty: {fileID: 0}
m_Value: {x: 0.9, y: 0, z: 0, w: 0}
--- !u!114 &11433636
MonoBehaviour:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: b251c305a044f49438dff356f1e7bb84, type: 3}
m_Name: SubtractNode
m_EditorClassIdentifier:
m_Slots:
- type: 1
m_Title: Output
m_Name: Output
m_DataTypeString:
- type: 0
m_Title: Input 1
m_Name: Input1
m_DataTypeString:
- type: 0
m_Title: Input 2
m_Name: Input2
m_DataTypeString:
m_Properties: []
m_GenericTypeString:
color: 0
style: node
position:
serializedVersion: 2
x: 468
y: -192
width: 74
height: 129
showEmptySlots: 1
m_SlotDefaultValues:
- m_DefaultVector: {x: 1, y: 1, z: 1, w: 1}
m_Editable: 1
m_SlotName: Output
m_Node: {fileID: 11433636}
- m_DefaultVector: {x: 1, y: 1, z: 1, w: 1}
m_Editable: 1
m_SlotName: Input1
m_Node: {fileID: 11433636}
- m_DefaultVector: {x: 1, y: 1, z: 1, w: 1}
m_Editable: 1
m_SlotName: Input2
m_Node: {fileID: 11433636}
m_PrecisionNames:
- half
--- !u!114 &11434580
MonoBehaviour:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 226075d30f5b2694caa212aa3e968148, type: 3}
m_Name:
m_EditorClassIdentifier:
nodes:
- {fileID: 11415036}
- {fileID: 11470860}
- {fileID: 11422740}
- {fileID: 11475404}
- {fileID: 11433636}
edges:
- m_FromNode: {fileID: 11422740}
m_ToNode: {fileID: 11415036}
m_FromSlotName: Value
m_ToSlotName: Smoothness
color: {r: 1, g: 1, b: 1, a: 1}
- m_FromNode: {fileID: 11475404}
m_ToNode: {fileID: 11433636}
m_FromSlotName: Output
m_ToSlotName: Input2
color: {r: 1, g: 1, b: 1, a: 1}
- m_FromNode: {fileID: 11433636}
m_ToNode: {fileID: 11415036}
m_FromSlotName: Output
m_ToSlotName: Albedo
color: {r: 1, g: 1, b: 1, a: 1}
m_InvalidEdges: []
--- !u!114 &11464382
MonoBehaviour:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: cab057dbd683f5244aed9bd721e1973e, type: 3}
m_Name:
m_EditorClassIdentifier:
m_ShaderProperties: []
previewState: 0
--- !u!114 &11470860
MonoBehaviour:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 325c0e24c20746345a5f90dc201973f8, type: 3}
m_Name: ColorNode
m_EditorClassIdentifier:
m_Slots:
- type: 1
m_Title: Color
m_Name: Color
m_DataTypeString:
m_Properties: []
m_GenericTypeString:
color: 0
style: node
position:
serializedVersion: 2
x: 492
y: 36
width: 58
height: 80
showEmptySlots: 1
m_SlotDefaultValues:
- m_DefaultVector: {x: 1, y: 1, z: 1, w: 1}
m_Editable: 1
m_SlotName: Color
m_Node: {fileID: 11470860}
m_PrecisionNames:
- half
m_BoundProperty: {fileID: 0}
m_Color: {r: 0.19108549, g: 0.22825164, b: 0.27943012, a: 0.10980392}
--- !u!114 &11475404
MonoBehaviour:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 5defdf1d05185a343bfebb2cdd827bd6, type: 3}
m_Name: Texture
m_EditorClassIdentifier:
m_Slots:
- type: 1
m_Title: Output
m_Name: Output
m_DataTypeString:
- type: 0
m_Title: UV
m_Name: UV
m_DataTypeString:
m_Properties: []
m_GenericTypeString:
color: 0
style: node
position:
serializedVersion: 2
x: 180
y: -240
width: 213
height: 139
showEmptySlots: 1
m_SlotDefaultValues:
- m_DefaultVector: {x: 1, y: 1, z: 1, w: 1}
m_Editable: 1
m_SlotName: Output
m_Node: {fileID: 11475404}
- m_DefaultVector: {x: 1, y: 1, z: 1, w: 1}
m_Editable: 1
m_SlotName: UV
m_Node: {fileID: 11475404}
m_PrecisionNames:
- half
m_BoundProperty: {fileID: 0}
m_DefaultTexture: {fileID: 2800000, guid: bd14517bc92dec64d9a79e8e95bc8e2a, type: 3}
m_TextureType: 0