initial commit
This commit is contained in:
parent
6715289efe
commit
788c3389af
37645 changed files with 2526849 additions and 80 deletions
|
|
@ -0,0 +1,12 @@
|
|||
1affaac2d6e57354aaa8d6573a2b32b8
|
||||
870d960fa9df7df428c4631082467d83
|
||||
7eb669e8a4269ac43a3c284ddafaf020
|
||||
570d3a71813b4774384e83408bfa0358
|
||||
65496ced1d1d0a041969a9ecf9b0b6ad
|
||||
d265c2168431eb34a8023cde98bd0c3f
|
||||
648f93a20881b6b46873534ea77ae463
|
||||
d579cc33c6fa60b4ea9cee9e184b62e3
|
||||
466c705646f921043a9da6880d2c17c4
|
||||
38fe892563f364c4783d208b2aef2277
|
||||
94348b07e5e8bab40bd6c8a1e3df54cd
|
||||
2992e84f91cbeb14eab234972e07ea9d
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 0949fbe0a6379b047adfed987401448f
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
|
@ -0,0 +1,49 @@
|
|||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &11400000
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 78b2425a2284af743826c689403a4924, type: 3}
|
||||
m_Name: BRDFMap
|
||||
m_EditorClassIdentifier:
|
||||
m_functionInfo: "// Made with Amplify Shader Editor\n// Available at the Unity
|
||||
Asset Store - http://u3d.as/y3X \n/*ASEBEGIN\nVersion=18935\n125;231;1819;901;1319.5;475.5;1;True;True\nNode;AmplifyShaderEditor.FunctionInput;3;-406,-48;Inherit;False;Input;1;0;True;1;0;FLOAT;0;False;1;FLOAT;0\nNode;AmplifyShaderEditor.TexturePropertyNode;1;-231.7726,29.98257;Inherit;True;Property;g_tBRDFMap;BRDF
|
||||
map;1;2;[NoScaleOffset];[SingleLineTexture];Fetch;False;0;0;0;True;0;False;None;None;False;white;Auto;Texture2D;-1;0;2;SAMPLER2D;0;SAMPLERSTATE;1\nNode;AmplifyShaderEditor.StaticSwitch;2;-206.2275,-67.98251;Inherit;False;Property;BRDFMAP;Enable
|
||||
BRDF map;0;0;Create;False;0;0;0;True;3;Space(20);Header(BRDF Lut);Space(10);False;0;0;0;True;_BRDFMAP;Toggle;2;Key0;Key1;Create;True;False;Fragment;9;1;FLOAT;0;False;0;FLOAT;0;False;2;FLOAT;0;False;3;FLOAT;0;False;4;FLOAT;0;False;5;FLOAT;0;False;6;FLOAT;0;False;7;FLOAT;0;False;8;FLOAT;0;False;1;FLOAT;0\nNode;AmplifyShaderEditor.FunctionOutput;0;85,-37;Inherit;False;True;-1;Output;0;False;1;0;FLOAT;0;False;1;FLOAT;0\nWireConnection;2;0;3;0\nWireConnection;0;0;2;0\nASEEND*/\n//CHKSM=2C4A9BEFEEEE01984229BFF1A71B87357940D593"
|
||||
m_functionName:
|
||||
m_description: 'Enables BRDF remapping. X axis is the light''s controbution based
|
||||
on normal direction to light. Y axis is the view normal dot.
|
||||
|
||||
|
||||
This DOES
|
||||
NOT need to be attached to the master node or need anything more to work. Input
|
||||
output is just for any other behaviors you want to add.'
|
||||
m_additionalIncludes:
|
||||
m_additionalIncludes: []
|
||||
m_outsideIncludes: []
|
||||
m_additionalPragmas:
|
||||
m_additionalPragmas: []
|
||||
m_outsidePragmas: []
|
||||
m_additionalDirectives:
|
||||
m_validData: 0
|
||||
m_isDirty: 1
|
||||
m_moduleName: ' Additional Directives'
|
||||
m_independentModule: 1
|
||||
m_customEdited: 0
|
||||
m_additionalDirectives: []
|
||||
m_shaderFunctionDirectives: []
|
||||
m_nativeDirectives: []
|
||||
m_nativeDirectivesIndex: -1
|
||||
m_nativeDirectivesFoldout: 0
|
||||
m_directivesSaveItems: []
|
||||
m_nodeCategory: 5
|
||||
m_customNodeCategory:
|
||||
m_previewPosition: 0
|
||||
m_hidden: 0
|
||||
m_url:
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 1affaac2d6e57354aaa8d6573a2b32b8
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
|
@ -0,0 +1,39 @@
|
|||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &11400000
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 78b2425a2284af743826c689403a4924, type: 3}
|
||||
m_Name: Depth Offseting
|
||||
m_EditorClassIdentifier:
|
||||
m_functionInfo: "// Made with Amplify Shader Editor\n// Available at the Unity
|
||||
Asset Store - http://u3d.as/y3X \n/*ASEBEGIN\nVersion=17700\n234;131;1350;833;955.8286;384.2751;1.308172;True;True\nNode;AmplifyShaderEditor.SimpleMultiplyOpNode;2;94.37987,195.8531;Inherit;False;2;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0\nNode;AmplifyShaderEditor.SimpleAddOpNode;4;-287.4436,0.8509827;Inherit;False;2;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0\nNode;AmplifyShaderEditor.ZBufferParams;6;-499.9534,171.2877;Inherit;False;0;5;FLOAT4;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4\nNode;AmplifyShaderEditor.SimpleMultiplyOpNode;7;-88.895,11.37553;Inherit;False;2;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0\nNode;AmplifyShaderEditor.OneMinusNode;8;68.5828,15.60175;Inherit;False;1;0;FLOAT;0;False;1;FLOAT;0\nNode;AmplifyShaderEditor.SimpleDivideOpNode;9;265.5796,16.29427;Inherit;False;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0\nNode;AmplifyShaderEditor.FunctionInput;1;-543.5876,41.08772;Inherit;False;Offset;1;0;False;1;0;FLOAT;0;False;1;FLOAT;0\nNode;AmplifyShaderEditor.FunctionInput;10;-538.5937,-48.30114;Inherit;False;ClipPos;1;1;False;1;0;FLOAT;0;False;1;FLOAT;0\nNode;AmplifyShaderEditor.FunctionOutput;0;528.471,32.04185;Inherit;False;True;-1;Output;0;False;1;0;FLOAT;0;False;1;FLOAT;0\nWireConnection;2;0;4;0\nWireConnection;2;1;6;3\nWireConnection;4;0;10;0\nWireConnection;4;1;1;0\nWireConnection;7;0;4;0\nWireConnection;7;1;6;4\nWireConnection;8;0;7;0\nWireConnection;9;0;8;0\nWireConnection;9;1;2;0\nWireConnection;0;0;9;0\nASEEND*/\n//CHKSM=539DC639103790E1B974A93725267FC027E2837B"
|
||||
m_functionName:
|
||||
m_description: 'Depth Offset. '
|
||||
m_additionalIncludes:
|
||||
m_additionalIncludes: []
|
||||
m_outsideIncludes: []
|
||||
m_additionalPragmas:
|
||||
m_additionalPragmas: []
|
||||
m_outsidePragmas: []
|
||||
m_additionalDirectives:
|
||||
m_validData: 0
|
||||
m_isDirty: 0
|
||||
m_moduleName: ' Additional Directives'
|
||||
m_independentModule: 1
|
||||
m_additionalDirectives: []
|
||||
m_shaderFunctionDirectives: []
|
||||
m_nativeDirectives: []
|
||||
m_nativeDirectivesIndex: -1
|
||||
m_nativeDirectivesFoldout: 0
|
||||
m_directivesSaveItems: []
|
||||
m_nodeCategory: 3
|
||||
m_customNodeCategory:
|
||||
m_previewPosition: 0
|
||||
m_hidden: 0
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 870d960fa9df7df428c4631082467d83
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
|
@ -0,0 +1,60 @@
|
|||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &11400000
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 78b2425a2284af743826c689403a4924, type: 3}
|
||||
m_Name: Detail Map
|
||||
m_EditorClassIdentifier:
|
||||
m_functionInfo: "// Made with Amplify Shader Editor\n// Available at the Unity
|
||||
Asset Store - http://u3d.as/y3X \n/*ASEBEGIN\nVersion=18935\n7;83;1266;913;2305.653;626.7997;1;True;True\nNode;AmplifyShaderEditor.CommentaryNode;85;99.49318,294.9654;Inherit;False;378.0446;265.2368;Assumes
|
||||
detailmap is always packed a certain way. ;4;81;82;83;84;Unpack normal;1,1,1,1;0;0\nNode;AmplifyShaderEditor.CommentaryNode;44;-1232.872,147.704;Inherit;False;896.7447;524.4265;Disabled
|
||||
for URP;3;18;20;19;Detail Smoothness control;1,1,1,1;0;0\nNode;AmplifyShaderEditor.CommentaryNode;43;-1100.776,-814.2831;Inherit;False;730.0462;485.2034;Disabled
|
||||
for URP;3;2;3;5;Detail albedo control;1,1,1,1;0;0\nNode;AmplifyShaderEditor.CommentaryNode;45;-163.7232,666.7288;Inherit;False;730.0462;485.2034;Disabled
|
||||
for URP;2;11;13;Detail Bump control;1,1,1,1;0;0\nNode;AmplifyShaderEditor.LerpOp;18;-671.5883,299.3031;Inherit;True;3;0;FLOAT;0.5;False;1;FLOAT;0.5;False;2;FLOAT;0;False;1;FLOAT;0\nNode;AmplifyShaderEditor.ColorNode;19;-1148.167,241.1992;Inherit;False;Constant;_Color0;Color
|
||||
0;5;0;Create;True;0;0;0;False;0;False;0.5,0.5,0.5,0;0,0,0,0;True;0;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4\nNode;AmplifyShaderEditor.FunctionNode;216;486.6969,-431.2388;Inherit;True;Overlay
|
||||
Blend;-1;;170;3987f7f74cd16f24eab3a89e587abb46;0;2;1;COLOR;1,1,1,1;False;2;FLOAT4;0.5,0.5,0.5,0.5019608;False;1;COLOR;0\nNode;AmplifyShaderEditor.SimpleAddOpNode;227;-1577.653,-223.7997;Inherit;False;2;2;0;FLOAT2;0,0;False;1;FLOAT2;0,0;False;1;FLOAT2;0\nNode;AmplifyShaderEditor.ColorNode;3;-985.7424,-764.2831;Half;False;Constant;_Color1;Color
|
||||
1;5;0;Create;True;0;0;0;False;0;False;0.5,0.5,0.5,0;0,0,0,0;True;0;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4\nNode;AmplifyShaderEditor.PowerNode;66;-539.52,4.192902;Inherit;False;False;2;0;FLOAT2;0,0;False;1;FLOAT;0.454545;False;1;FLOAT2;0\nNode;AmplifyShaderEditor.UnpackScaleNormalNode;11;272.1628,877.9655;Inherit;True;Tangent;2;0;FLOAT4;0.5,0.5,1,0.5;False;1;FLOAT;0.5;False;4;FLOAT3;0;FLOAT;1;FLOAT;2;FLOAT;3\nNode;AmplifyShaderEditor.BreakToComponentsNode;79;-461.421,-71.22977;Inherit;False;FLOAT2;1;0;FLOAT2;0,0;False;16;FLOAT;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4;FLOAT;5;FLOAT;6;FLOAT;7;FLOAT;8;FLOAT;9;FLOAT;10;FLOAT;11;FLOAT;12;FLOAT;13;FLOAT;14;FLOAT;15\nNode;AmplifyShaderEditor.FunctionInput;22;301.6013,143.1306;Inherit;False;Normal;5;1;False;1;0;COLOR;0,0,1,0;False;1;COLOR;0\nNode;AmplifyShaderEditor.LerpOp;5;-635.7298,-607.8218;Inherit;True;3;0;FLOAT;0.5;False;1;FLOAT;0.5;False;2;FLOAT;0;False;1;FLOAT;0\nNode;AmplifyShaderEditor.StaticSwitch;26;1249.236,239.4649;Inherit;False;Property;_Details;Details;9;0;Create;True;0;0;0;False;0;False;0;0;0;True;;Toggle;2;Key0;Key1;Reference;16;True;True;All;9;1;COLOR;0,0,0,0;False;0;COLOR;0,0,0,0;False;2;COLOR;0,0,0,0;False;3;COLOR;0,0,0,0;False;4;COLOR;0,0,0,0;False;5;COLOR;0,0,0,0;False;6;COLOR;0,0,0,0;False;7;COLOR;0,0,0,0;False;8;COLOR;0,0,0,0;False;1;COLOR;0\nNode;AmplifyShaderEditor.SwizzleNode;74;94.80289,-417.9453;Inherit;False;FLOAT4;0;0;0;0;1;0;FLOAT;0;False;1;FLOAT4;0\nNode;AmplifyShaderEditor.SwizzleNode;57;-759.0727,-88.85658;Inherit;True;FLOAT2;1;3;2;3;1;0;COLOR;0,0,0,0;False;1;FLOAT2;0\nNode;AmplifyShaderEditor.StaticSwitch;16;1317.667,-331.3785;Inherit;False;Property;_Details;Details
|
||||
enabled;0;0;Create;False;0;0;0;False;3;Space(30);Header(Details);Space(10);False;0;0;0;True;;Toggle;2;Key0;Key1;Create;True;True;Fragment;9;1;COLOR;0,0,0,0;False;0;COLOR;0,0,0,0;False;2;COLOR;0,0,0,0;False;3;COLOR;0,0,0,0;False;4;COLOR;0,0,0,0;False;5;COLOR;0,0,0,0;False;6;COLOR;0,0,0,0;False;7;COLOR;0,0,0,0;False;8;COLOR;0,0,0,0;False;1;COLOR;0\nNode;AmplifyShaderEditor.TextureTransformNode;223;-1960.653,-143.7997;Inherit;False;-1;False;1;0;SAMPLER2D;;False;2;FLOAT2;0;FLOAT2;1\nNode;AmplifyShaderEditor.BlendNormalsNode;48;714.1782,291.5409;Inherit;True;0;3;0;FLOAT3;0,0,0;False;1;FLOAT3;0,0,1;False;2;FLOAT3;0,0,0;False;1;FLOAT3;0\nNode;AmplifyShaderEditor.SimpleDivideOpNode;226;-1717.653,-354.7997;Inherit;False;2;0;FLOAT2;0,0;False;1;FLOAT2;0,0;False;1;FLOAT2;0\nNode;AmplifyShaderEditor.RangedFloatNode;84;295.2076,442.9457;Inherit;False;Constant;_Float8;Float
|
||||
8;5;0;Create;True;0;0;0;False;0;False;1;0;0;0;0;1;FLOAT;0\nNode;AmplifyShaderEditor.CustomExpressionNode;217;825.757,62.11609;Inherit;False;smoothness
|
||||
* (2.0 * detailSmooth);1;Create;2;True;detailSmooth;FLOAT;0;In;;Inherit;False;True;smoothness;FLOAT;0;In;;Inherit;False;My
|
||||
Custom Expression;True;False;0;;False;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0\nNode;AmplifyShaderEditor.StaticSwitch;17;1293.06,-139.5651;Inherit;False;Property;_Details;Details;9;0;Create;True;0;0;0;False;0;False;0;0;0;True;;Toggle;2;Key0;Key1;Reference;16;True;True;All;9;1;FLOAT;0;False;0;FLOAT;0;False;2;FLOAT;0;False;3;FLOAT;0;False;4;FLOAT;0;False;5;FLOAT;0;False;6;FLOAT;0;False;7;FLOAT;0;False;8;FLOAT;0;False;1;FLOAT;0\nNode;AmplifyShaderEditor.RangedFloatNode;20;-1220.07,420.3175;Inherit;False;Property;_DetailSmoothnessScale;Detail
|
||||
Smoothness Scale;3;0;Create;True;0;0;0;False;0;False;1;0;0;2;0;1;FLOAT;0\nNode;AmplifyShaderEditor.SimpleSubtractOpNode;83;311.5378,347.4776;Inherit;False;2;0;FLOAT3;0,0,0;False;1;FLOAT;0;False;1;FLOAT3;0\nNode;AmplifyShaderEditor.RangedFloatNode;2;-1050.776,-588.0797;Inherit;True;Property;_DetailAlbedoScale;Detail
|
||||
Albedo Scale;1;0;Create;True;0;0;0;False;0;False;1.004632;0;0;2;0;1;FLOAT;0\nNode;AmplifyShaderEditor.FunctionInput;23;355.6217,-126.4543;Inherit;False;Smoothness;1;2;False;1;0;FLOAT;0.5;False;1;FLOAT;0\nNode;AmplifyShaderEditor.SimpleMultiplyOpNode;81;157.0301,344.9654;Inherit;False;2;2;0;FLOAT3;0,0,0;False;1;FLOAT;0;False;1;FLOAT3;0\nNode;AmplifyShaderEditor.FunctionNode;215;867.4139,-44.34997;Inherit;False;Overlay
|
||||
Blend;-1;;168;3987f7f74cd16f24eab3a89e587abb46;0;2;1;FLOAT;1;False;2;FLOAT;0.5;False;1;FLOAT;0\nNode;AmplifyShaderEditor.RangedFloatNode;82;149.4932,444.2021;Inherit;False;Constant;_Float7;Float
|
||||
7;5;0;Create;True;0;0;0;False;0;False;2;0;0;0;0;1;FLOAT;0\nNode;AmplifyShaderEditor.DynamicAppendNode;56;-160.1557,-25.49151;Inherit;True;FLOAT3;4;0;FLOAT;0;False;1;FLOAT;0;False;2;FLOAT;1;False;3;FLOAT;0;False;1;FLOAT3;0\nNode;AmplifyShaderEditor.SamplerNode;1;-1283.168,-281.1511;Inherit;True;Property;_DetailMapSample;DetailMapSample;1;1;[Gamma];Create;True;0;0;0;False;0;False;-1;None;88d6ec2873fdbac4b8b66f84a0d6b953;True;0;False;gray;Auto;False;Object;-1;Auto;Texture2D;8;0;SAMPLER2D;;False;1;FLOAT2;0,0;False;2;FLOAT;0;False;3;FLOAT2;0,0;False;4;FLOAT2;0,0;False;5;FLOAT;1;False;6;FLOAT;0;False;7;SAMPLERSTATE;;False;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4\nNode;AmplifyShaderEditor.TexturePropertyNode;222;-1766.653,-593.7997;Inherit;True;Property;_DetailMap;DetailMap;4;0;Create;True;0;0;0;False;0;False;None;None;False;white;Auto;Texture2D;-1;0;2;SAMPLER2D;0;SAMPLERSTATE;1\nNode;AmplifyShaderEditor.FunctionInput;218;-1985.653,-310.7997;Inherit;False;UVs;2;3;False;1;0;FLOAT2;0,0;False;1;FLOAT2;0\nNode;AmplifyShaderEditor.TextureCoordinatesNode;219;-2256.653,-307.7997;Inherit;False;0;-1;2;3;2;SAMPLER2D;;False;0;FLOAT2;1,1;False;1;FLOAT2;0,0;False;5;FLOAT2;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4\nNode;AmplifyShaderEditor.FunctionNode;67;210.8537,217.7421;Inherit;False;UnpackNormal;-1;;169;e881a95dc12b33643ac7d663807711b1;0;1;1;FLOAT4;0,0,0,0;False;1;FLOAT3;0\nNode;AmplifyShaderEditor.RangedFloatNode;13;-100.9284,940.9196;Inherit;False;Property;_DetailNormalScale;Detail
|
||||
Normal Scale;2;0;Create;True;0;0;0;False;0;False;1;0;0;2;0;1;FLOAT;0\nNode;AmplifyShaderEditor.FunctionInput;21;81.31754,-766.7005;Inherit;True;Albedo;5;0;False;1;0;COLOR;1,1,1,1;False;1;COLOR;0\nNode;AmplifyShaderEditor.SimpleMultiplyOpNode;228;-1724.653,-238.7997;Inherit;False;2;2;0;FLOAT2;0,0;False;1;FLOAT2;0,0;False;1;FLOAT2;0\nNode;AmplifyShaderEditor.FunctionOutput;0;1681.469,-324.6566;Inherit;False;True;-1;Output
|
||||
Albedo;0;False;1;0;COLOR;0,0,0,0;False;1;COLOR;0\nNode;AmplifyShaderEditor.FunctionOutput;25;1704.735,364.0971;Inherit;False;False;-1;Output
|
||||
Normal;1;False;1;0;COLOR;0,0,0,0;False;1;COLOR;0\nNode;AmplifyShaderEditor.FunctionOutput;24;1607.839,-183.2353;Inherit;False;False;-1;Output
|
||||
Smoothness;2;False;1;0;FLOAT;0;False;1;FLOAT;0\nWireConnection;18;0;19;1\nWireConnection;18;1;1;3\nWireConnection;18;2;20;0\nWireConnection;216;1;21;0\nWireConnection;216;2;74;0\nWireConnection;227;0;228;0\nWireConnection;227;1;223;1\nWireConnection;66;0;57;0\nWireConnection;11;1;13;0\nWireConnection;79;0;57;0\nWireConnection;5;0;3;1\nWireConnection;5;1;1;1\nWireConnection;5;2;2;0\nWireConnection;26;1;22;0\nWireConnection;26;0;48;0\nWireConnection;74;0;1;1\nWireConnection;57;0;1;0\nWireConnection;16;1;21;0\nWireConnection;16;0;216;0\nWireConnection;223;0;222;0\nWireConnection;48;0;22;0\nWireConnection;48;1;83;0\nWireConnection;226;0;218;0\nWireConnection;226;1;223;0\nWireConnection;217;0;1;3\nWireConnection;217;1;23;0\nWireConnection;17;1;23;0\nWireConnection;17;0;217;0\nWireConnection;83;0;81;0\nWireConnection;83;1;84;0\nWireConnection;81;0;56;0\nWireConnection;81;1;82;0\nWireConnection;215;1;23;0\nWireConnection;215;2;1;3\nWireConnection;56;0;79;1\nWireConnection;56;1;79;0\nWireConnection;1;0;222;0\nWireConnection;1;1;227;0\nWireConnection;218;0;219;0\nWireConnection;67;1;56;0\nWireConnection;228;0;218;0\nWireConnection;228;1;223;0\nWireConnection;0;0;16;0\nWireConnection;25;0;26;0\nWireConnection;24;0;17;0\nASEEND*/\n//CHKSM=024AE426904A8930EF86E05646B7DB773B26800E"
|
||||
m_functionName:
|
||||
m_description: Detail map. Packing based on HDRP.
|
||||
m_additionalIncludes:
|
||||
m_additionalIncludes: []
|
||||
m_outsideIncludes: []
|
||||
m_additionalPragmas:
|
||||
m_additionalPragmas: []
|
||||
m_outsidePragmas: []
|
||||
m_additionalDirectives:
|
||||
m_validData: 0
|
||||
m_isDirty: 0
|
||||
m_moduleName: ' Additional Directives'
|
||||
m_independentModule: 1
|
||||
m_customEdited: 0
|
||||
m_additionalDirectives: []
|
||||
m_shaderFunctionDirectives: []
|
||||
m_nativeDirectives: []
|
||||
m_nativeDirectivesIndex: -1
|
||||
m_nativeDirectivesFoldout: 0
|
||||
m_directivesSaveItems: []
|
||||
m_nodeCategory: 3
|
||||
m_customNodeCategory:
|
||||
m_previewPosition: 0
|
||||
m_hidden: 0
|
||||
m_url:
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 7eb669e8a4269ac43a3c284ddafaf020
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
|
@ -0,0 +1,43 @@
|
|||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &11400000
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 78b2425a2284af743826c689403a4924, type: 3}
|
||||
m_Name: GeometricRoughness
|
||||
m_EditorClassIdentifier:
|
||||
m_functionInfo: "// Made with Amplify Shader Editor\n// Available at the Unity
|
||||
Asset Store - http://u3d.as/y3X \n/*ASEBEGIN\nVersion=18935\n95;97;1723;818;1032.271;390.1535;1;True;True\nNode;AmplifyShaderEditor.SimpleMaxOpNode;12;-665.9119,41.22078;Inherit;False;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0\nNode;AmplifyShaderEditor.OneMinusNode;14;-491.0589,43.94327;Inherit;False;1;0;FLOAT;0;False;1;FLOAT;0\nNode;AmplifyShaderEditor.OneMinusNode;13;-878.056,38.78407;Inherit;False;1;0;FLOAT;0;False;1;FLOAT;0\nNode;AmplifyShaderEditor.DdxOpNode;4;-1355.345,308.4385;Inherit;False;1;0;FLOAT3;0,0,0;False;1;FLOAT3;0\nNode;AmplifyShaderEditor.DdyOpNode;3;-1352.345,239.4385;Inherit;False;1;0;FLOAT3;0,0,0;False;1;FLOAT3;0\nNode;AmplifyShaderEditor.NormalVertexDataNode;8;-1586.344,263.4385;Inherit;False;0;5;FLOAT3;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4\nNode;AmplifyShaderEditor.DotProductOpNode;9;-1195.345,211.4385;Inherit;False;2;0;FLOAT3;0,0,0;False;1;FLOAT3;0,0,0;False;1;FLOAT;0\nNode;AmplifyShaderEditor.DotProductOpNode;10;-1193.345,320.4385;Inherit;False;2;0;FLOAT3;0,0,0;False;1;FLOAT3;0,0,0;False;1;FLOAT;0\nNode;AmplifyShaderEditor.SimpleMaxOpNode;6;-1010.345,252.4385;Inherit;False;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0\nNode;AmplifyShaderEditor.SaturateNode;11;-844.3451,255.4385;Inherit;False;1;0;FLOAT;0;False;1;FLOAT;0\nNode;AmplifyShaderEditor.PowerNode;5;-676.3451,253.4385;Inherit;True;False;2;0;FLOAT;0;False;1;FLOAT;0.333;False;1;FLOAT;0\nNode;AmplifyShaderEditor.FunctionInput;2;-1464.986,-170.2888;Inherit;False;Smoothness
|
||||
Input;1;0;False;1;0;FLOAT;0;False;1;FLOAT;0\nNode;AmplifyShaderEditor.StaticSwitch;1;-354.97,-125.1068;Inherit;False;Property;_GeometricRoughness;Geometric
|
||||
Roughness;0;0;Create;False;0;0;0;False;0;False;0;0;0;True;;Toggle;2;Key0;Key1;Create;True;True;All;9;1;FLOAT;0;False;0;FLOAT;0;False;2;FLOAT;0;False;3;FLOAT;0;False;4;FLOAT;0;False;5;FLOAT;0;False;6;FLOAT;0;False;7;FLOAT;0;False;8;FLOAT;0;False;1;FLOAT;0\nNode;AmplifyShaderEditor.FunctionOutput;0;93.3222,-69.22312;Inherit;False;True;-1;Output;0;False;1;0;FLOAT;0;False;1;FLOAT;0\nWireConnection;12;0;13;0\nWireConnection;12;1;5;0\nWireConnection;14;0;12;0\nWireConnection;13;0;2;0\nWireConnection;4;0;8;0\nWireConnection;3;0;8;0\nWireConnection;9;0;3;0\nWireConnection;9;1;3;0\nWireConnection;10;0;4;0\nWireConnection;10;1;4;0\nWireConnection;6;0;9;0\nWireConnection;6;1;10;0\nWireConnection;11;0;6;0\nWireConnection;5;0;11;0\nWireConnection;1;1;2;0\nWireConnection;1;0;14;0\nWireConnection;0;0;14;0\nASEEND*/\n//CHKSM=3266D788DDDC19DFC7755DD0F8304704023B3067"
|
||||
m_functionName:
|
||||
m_description:
|
||||
m_additionalIncludes:
|
||||
m_additionalIncludes: []
|
||||
m_outsideIncludes: []
|
||||
m_additionalPragmas:
|
||||
m_additionalPragmas: []
|
||||
m_outsidePragmas: []
|
||||
m_additionalDirectives:
|
||||
m_validData: 0
|
||||
m_isDirty: 0
|
||||
m_moduleName: ' Additional Directives'
|
||||
m_independentModule: 1
|
||||
m_customEdited: 0
|
||||
m_additionalDirectives: []
|
||||
m_shaderFunctionDirectives: []
|
||||
m_nativeDirectives: []
|
||||
m_nativeDirectivesIndex: -1
|
||||
m_nativeDirectivesFoldout: 0
|
||||
m_directivesSaveItems: []
|
||||
m_nodeCategory: 3
|
||||
m_customNodeCategory:
|
||||
m_previewPosition: 0
|
||||
m_hidden: 0
|
||||
m_url:
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 570d3a71813b4774384e83408bfa0358
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
|
@ -0,0 +1,49 @@
|
|||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &11400000
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 78b2425a2284af743826c689403a4924, type: 3}
|
||||
m_Name: Global Blue Noise Sample
|
||||
m_EditorClassIdentifier:
|
||||
m_functionInfo: "// Made with Amplify Shader Editor\n// Available at the Unity
|
||||
Asset Store - http://u3d.as/y3X \n/*ASEBEGIN\nVersion=18935\n2177;584;1920;953;1912.342;939.9965;1;True;True\nNode;AmplifyShaderEditor.SwizzleNode;29;-1117.584,-483.9873;Inherit;False;FLOAT2;0;1;2;3;1;0;FLOAT4;0,0,0,0;False;1;FLOAT2;0\nNode;AmplifyShaderEditor.GrabScreenPosition;28;-1373.541,-524.678;Inherit;False;0;0;5;FLOAT4;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4\nNode;AmplifyShaderEditor.FunctionInput;8;-914.5869,-434.8147;Inherit;False;UV;2;0;False;1;0;FLOAT2;0,0;False;1;FLOAT2;0\nNode;AmplifyShaderEditor.CustomExpressionNode;27;-733.6172,-437.6748;Inherit;False;GetScreenNoiseRGBAOffset(screenUV,
|
||||
offsetFrame);4;Create;2;True;screenUV;FLOAT2;0,0;In;;Inherit;False;True;offsetFrame;FLOAT;0;In;;Inherit;False;GetScreenNoiseRGBASlice;True;False;0;;False;2;0;FLOAT2;0,0;False;1;FLOAT;0;False;1;FLOAT4;0\nNode;AmplifyShaderEditor.FunctionInput;10;-956.095,-290.4197;Inherit;False;Index
|
||||
Offset;1;1;False;1;0;FLOAT;0;False;1;FLOAT;0\nNode;AmplifyShaderEditor.FunctionOutput;0;-429.535,-441.4992;Inherit;False;True;-1;Output;0;False;1;0;FLOAT4;0,0,0,0;False;1;FLOAT4;0\nWireConnection;29;0;28;0\nWireConnection;8;0;29;0\nWireConnection;27;0;8;0\nWireConnection;27;1;10;0\nWireConnection;0;0;27;0\nASEEND*/\n//CHKSM=F565DD616582EB3966C88938D62C6612B75F426E"
|
||||
m_functionName:
|
||||
m_description:
|
||||
m_additionalIncludes:
|
||||
m_additionalIncludes: []
|
||||
m_outsideIncludes: []
|
||||
m_additionalPragmas:
|
||||
m_additionalPragmas: []
|
||||
m_outsidePragmas: []
|
||||
m_additionalDirectives:
|
||||
m_validData: 0
|
||||
m_isDirty: 1
|
||||
m_moduleName: ' Additional Directives'
|
||||
m_independentModule: 1
|
||||
m_customEdited: 0
|
||||
m_additionalDirectives:
|
||||
- {fileID: 0}
|
||||
m_shaderFunctionDirectives: []
|
||||
m_nativeDirectives: []
|
||||
m_nativeDirectivesIndex: -1
|
||||
m_nativeDirectivesFoldout: 0
|
||||
m_directivesSaveItems:
|
||||
- LineType: 0
|
||||
LineValue: Packages/com.unity.render-pipelines.universal/ShaderLibrary/SLZBlueNoise.hlsl
|
||||
GUIDToggle: 0
|
||||
GUIDValue:
|
||||
Origin: 2
|
||||
m_nodeCategory: 3
|
||||
m_customNodeCategory:
|
||||
m_previewPosition: 0
|
||||
m_hidden: 0
|
||||
m_url:
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 65496ced1d1d0a041969a9ecf9b0b6ad
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
|
@ -0,0 +1,50 @@
|
|||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &11400000
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 78b2425a2284af743826c689403a4924, type: 3}
|
||||
m_Name: GrabScreenColorManualLevel
|
||||
m_EditorClassIdentifier:
|
||||
m_functionInfo: "// Made with Amplify Shader Editor\n// Available at the Unity
|
||||
Asset Store - http://u3d.as/y3X \n/*ASEBEGIN\nVersion=18935\n764;503;1538;1085;1594.303;597.1317;1.3;True;True\nNode;AmplifyShaderEditor.GrabScreenPosition;4;-809,-146.5;Inherit;False;0;0;5;FLOAT4;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4\nNode;AmplifyShaderEditor.FunctionInput;5;-525,-118.5;Inherit;False;UV;2;0;False;1;0;FLOAT2;0,0;False;1;FLOAT2;0\nNode;AmplifyShaderEditor.FunctionInput;2;-526,-11.5;Inherit;False;Mip
|
||||
level;1;1;False;1;0;FLOAT;0;False;1;FLOAT;0\nNode;AmplifyShaderEditor.CustomExpressionNode;1;-287,-40.5;Inherit;False;return
|
||||
SAMPLE_TEXTURE2D_X_LOD(_CameraOpaqueTexture, sampler_CameraOpaqueTexture, UnityStereoTransformScreenSpaceTex(uv),level).rgb@$;3;Create;2;True;uv;FLOAT2;0,0;In;;Inherit;False;True;level;FLOAT;0;In;;Inherit;False;My
|
||||
Custom Expression;True;False;0;;False;2;0;FLOAT2;0,0;False;1;FLOAT;0;False;1;FLOAT3;0\nNode;AmplifyShaderEditor.FunctionOutput;0;-25,-37;Inherit;False;True;-1;Output;0;False;1;0;FLOAT3;0,0,0;False;1;FLOAT3;0\nWireConnection;5;0;4;0\nWireConnection;1;0;5;0\nWireConnection;1;1;2;0\nWireConnection;0;0;1;0\nASEEND*/\n//CHKSM=C60E2D159AAFAAD95038B4D0BFAFB0F860AAA752"
|
||||
m_functionName:
|
||||
m_description: Grab screen color with manual mip levels
|
||||
m_additionalIncludes:
|
||||
m_additionalIncludes: []
|
||||
m_outsideIncludes: []
|
||||
m_additionalPragmas:
|
||||
m_additionalPragmas: []
|
||||
m_outsidePragmas: []
|
||||
m_additionalDirectives:
|
||||
m_validData: 0
|
||||
m_isDirty: 1
|
||||
m_moduleName: ' Additional Directives'
|
||||
m_independentModule: 1
|
||||
m_customEdited: 0
|
||||
m_additionalDirectives:
|
||||
- {fileID: 0}
|
||||
m_shaderFunctionDirectives: []
|
||||
m_nativeDirectives: []
|
||||
m_nativeDirectivesIndex: -1
|
||||
m_nativeDirectivesFoldout: 0
|
||||
m_directivesSaveItems:
|
||||
- LineType: 0
|
||||
LineValue: Packages/com.unity.render-pipelines.universal/ShaderLibrary/DeclareOpaqueTexture.hlsl
|
||||
GUIDToggle: 0
|
||||
GUIDValue:
|
||||
Origin: 2
|
||||
m_nodeCategory: 3
|
||||
m_customNodeCategory:
|
||||
m_previewPosition: 0
|
||||
m_hidden: 0
|
||||
m_url:
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
fileFormatVersion: 2
|
||||
guid: d265c2168431eb34a8023cde98bd0c3f
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
|
@ -0,0 +1,45 @@
|
|||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &11400000
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 78b2425a2284af743826c689403a4924, type: 3}
|
||||
m_Name: Overlay Blend
|
||||
m_EditorClassIdentifier:
|
||||
m_functionInfo: "// Made with Amplify Shader Editor\n// Available at the Unity
|
||||
Asset Store - http://u3d.as/y3X \n/*ASEBEGIN\nVersion=18935\n93;312;1600;594;1543.824;458.6379;1.640696;True;True\nNode;AmplifyShaderEditor.CommentaryNode;113;-279.2125,288.2333;Inherit;False;381.6501;225.6743;Comment;2;14;13;;1,1,1,1;0;0\nNode;AmplifyShaderEditor.CommentaryNode;112;-253.6661,-114.1908;Inherit;False;646.1831;301.3626;Greater
|
||||
than .5;5;71;22;72;23;73;;1,1,1,1;0;0\nNode;AmplifyShaderEditor.CommentaryNode;111;553.7355,-240.452;Inherit;False;688.8996;318.0162;Multicolor
|
||||
if;5;109;107;106;108;110;;1,1,1,1;0;0\nNode;AmplifyShaderEditor.FunctionInput;1;-1045.78,-154.4086;Inherit;True;a;5;0;True;1;0;COLOR;1,1,1,1;False;1;COLOR;0\nNode;AmplifyShaderEditor.RelayNode;86;-672.1319,260.9221;Inherit;False;1;0;COLOR;0,0,0,0;False;1;COLOR;0\nNode;AmplifyShaderEditor.RelayNode;84;-685.4547,-189.7087;Inherit;False;1;0;COLOR;0,0,0,0;False;1;COLOR;0\nNode;AmplifyShaderEditor.SimpleMultiplyOpNode;108;797.0048,-27.98866;Inherit;False;2;2;0;COLOR;0,0,0,0;False;1;COLOR;0,0,0,0;False;1;COLOR;0\nNode;AmplifyShaderEditor.OneMinusNode;107;789.1998,-98.29133;Inherit;False;1;0;COLOR;0,0,0,0;False;1;COLOR;0\nNode;AmplifyShaderEditor.GammaToLinearNode;79;-1375.975,-85.63178;Inherit;True;0;1;0;FLOAT3;0,0,0;False;1;FLOAT3;0\nNode;AmplifyShaderEditor.TextureCoordinatesNode;78;-1705.532,-90.13477;Inherit;False;0;-1;2;3;2;SAMPLER2D;;False;0;FLOAT2;1,1;False;1;FLOAT2;0,0;False;5;FLOAT2;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4\nNode;AmplifyShaderEditor.GammaToLinearNode;80;-1399.458,155.3374;Inherit;True;0;1;0;FLOAT3;0,0,0;False;1;FLOAT3;0\nNode;AmplifyShaderEditor.SimpleAddOpNode;110;1022.497,-149.3369;Inherit;False;2;2;0;COLOR;0,0,0,0;False;1;COLOR;0,0,0,0;False;1;COLOR;0\nNode;AmplifyShaderEditor.OneMinusNode;71;207.1324,-39.49105;Inherit;False;1;0;COLOR;0,0,0,0;False;1;COLOR;0\nNode;AmplifyShaderEditor.SimpleMultiplyOpNode;22;16.23729,-31.93254;Inherit;False;3;3;0;COLOR;0,0,0,0;False;1;COLOR;0,0,0,0;False;2;FLOAT;0;False;1;COLOR;0\nNode;AmplifyShaderEditor.OneMinusNode;72;-203.6667,-64.19084;Inherit;False;1;0;COLOR;0,0,0,0;False;1;COLOR;0\nNode;AmplifyShaderEditor.RangedFloatNode;23;-190.7624,98.36767;Inherit;False;Constant;_Float1;Float
|
||||
1;0;0;Create;True;0;0;0;False;0;False;2;0;0;0;0;1;FLOAT;0\nNode;AmplifyShaderEditor.OneMinusNode;73;-199.7671,11.20915;Inherit;False;1;0;COLOR;0,0,0,0;False;1;COLOR;0\nNode;AmplifyShaderEditor.SimpleMultiplyOpNode;13;-59.56247,338.2333;Inherit;False;3;3;0;COLOR;0,0,0,0;False;1;COLOR;0,0,0,0;False;2;FLOAT;0;False;1;COLOR;0\nNode;AmplifyShaderEditor.RoundOpNode;109;593.4344,-185.7964;Inherit;False;1;0;COLOR;0,0,0,0;False;1;COLOR;0\nNode;AmplifyShaderEditor.SimpleMultiplyOpNode;106;801.5415,-192.772;Inherit;False;2;2;0;COLOR;0,0,0,0;False;1;COLOR;0,0,0,0;False;1;COLOR;0\nNode;AmplifyShaderEditor.RangedFloatNode;14;-229.2125,397.9076;Inherit;False;Constant;_Float0;Float
|
||||
0;0;0;Create;True;0;0;0;False;0;False;2;0;0;0;0;1;FLOAT;0\nNode;AmplifyShaderEditor.FunctionInput;2;-1038.189,247.8662;Inherit;True;b;5;1;True;1;0;COLOR;0.5,0.5,0.5,0.5019608;False;1;COLOR;0\nNode;AmplifyShaderEditor.FunctionOutput;0;1321.579,-141.0846;Inherit;True;True;-1;Output;0;False;1;0;COLOR;0,0,0,0;False;1;COLOR;0\nWireConnection;86;0;2;0\nWireConnection;84;0;1;0\nWireConnection;108;0;107;0\nWireConnection;108;1;13;0\nWireConnection;107;0;109;0\nWireConnection;79;0;78;1\nWireConnection;80;0;78;2\nWireConnection;110;0;106;0\nWireConnection;110;1;108;0\nWireConnection;71;0;22;0\nWireConnection;22;0;72;0\nWireConnection;22;1;73;0\nWireConnection;22;2;23;0\nWireConnection;72;0;84;0\nWireConnection;73;0;86;0\nWireConnection;13;0;84;0\nWireConnection;13;1;86;0\nWireConnection;13;2;14;0\nWireConnection;109;0;84;0\nWireConnection;106;0;109;0\nWireConnection;106;1;71;0\nWireConnection;0;0;110;0\nASEEND*/\n//CHKSM=F88D8F1D4244EE7CE984FA2CDD0587C6989B2F2B"
|
||||
m_functionName:
|
||||
m_description: Multicolor Overlay funtion
|
||||
m_additionalIncludes:
|
||||
m_additionalIncludes: []
|
||||
m_outsideIncludes: []
|
||||
m_additionalPragmas:
|
||||
m_additionalPragmas: []
|
||||
m_outsidePragmas: []
|
||||
m_additionalDirectives:
|
||||
m_validData: 0
|
||||
m_isDirty: 0
|
||||
m_moduleName: ' Additional Directives'
|
||||
m_independentModule: 1
|
||||
m_customEdited: 0
|
||||
m_additionalDirectives: []
|
||||
m_shaderFunctionDirectives: []
|
||||
m_nativeDirectives: []
|
||||
m_nativeDirectivesIndex: -1
|
||||
m_nativeDirectivesFoldout: 0
|
||||
m_directivesSaveItems: []
|
||||
m_nodeCategory: 3
|
||||
m_customNodeCategory:
|
||||
m_previewPosition: 0
|
||||
m_hidden: 0
|
||||
m_url:
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 648f93a20881b6b46873534ea77ae463
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
|
@ -0,0 +1,42 @@
|
|||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &11400000
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 78b2425a2284af743826c689403a4924, type: 3}
|
||||
m_Name: UnpackNormal
|
||||
m_EditorClassIdentifier:
|
||||
m_functionInfo: "// Made with Amplify Shader Editor\n// Available at the Unity
|
||||
Asset Store - http://u3d.as/y3X \n/*ASEBEGIN\nVersion=17700\n175;390;1323;694;783.5;332;1;True;True\nNode;AmplifyShaderEditor.FunctionInput;1;-477.5,1;Inherit;False;Input;4;0;False;1;0;FLOAT4;0,0,0,0;False;1;FLOAT4;0\nNode;AmplifyShaderEditor.CustomExpressionNode;2;-271.5,-1;Inherit;False;UnpackNormal(In0)@;3;False;1;True;In0;FLOAT4;0,0,0,0;In;;Half;False;My
|
||||
Custom Expression;False;False;0;1;0;FLOAT4;0,0,0,0;False;1;FLOAT3;0\nNode;AmplifyShaderEditor.FunctionOutput;0;0,0;Inherit;True;True;-1;Output;0;False;1;0;FLOAT3;0,0,0;False;1;FLOAT3;0\nWireConnection;2;0;1;0\nWireConnection;0;0;2;0\nASEEND*/\n//CHKSM=40995227F3DAFD1988084903685DE16B9329A88F"
|
||||
m_functionName:
|
||||
m_description: 'Unpack normal map without scaling.
|
||||
|
||||
Use with URP.'
|
||||
m_additionalIncludes:
|
||||
m_additionalIncludes: []
|
||||
m_outsideIncludes: []
|
||||
m_additionalPragmas:
|
||||
m_additionalPragmas: []
|
||||
m_outsidePragmas: []
|
||||
m_additionalDirectives:
|
||||
m_validData: 0
|
||||
m_isDirty: 0
|
||||
m_moduleName: ' Additional Directives'
|
||||
m_independentModule: 1
|
||||
m_additionalDirectives: []
|
||||
m_shaderFunctionDirectives: []
|
||||
m_nativeDirectives: []
|
||||
m_nativeDirectivesIndex: -1
|
||||
m_nativeDirectivesFoldout: 0
|
||||
m_directivesSaveItems: []
|
||||
m_nodeCategory: 12
|
||||
m_customNodeCategory:
|
||||
m_previewPosition: 0
|
||||
m_hidden: 0
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
fileFormatVersion: 2
|
||||
guid: d579cc33c6fa60b4ea9cee9e184b62e3
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
|
@ -0,0 +1,49 @@
|
|||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &11400000
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 78b2425a2284af743826c689403a4924, type: 3}
|
||||
m_Name: VolumetricsUnlit
|
||||
m_EditorClassIdentifier:
|
||||
m_functionInfo: "// Made with Amplify Shader Editor\n// Available at the Unity
|
||||
Asset Store - http://u3d.as/y3X \n/*ASEBEGIN\nVersion=18400\n0;321;1858;738;1440;294;1;True;False\nNode;AmplifyShaderEditor.FunctionInput;2;-664,-48.5;Inherit;False;Color;4;0;False;1;0;FLOAT4;0,0,0,0;False;1;FLOAT4;0\nNode;AmplifyShaderEditor.FunctionInput;3;-730,41.5;Inherit;False;World
|
||||
Space Position;3;1;False;1;0;FLOAT3;0,0,0;False;1;FLOAT3;0\nNode;AmplifyShaderEditor.CustomExpressionNode;1;-421.9999,-33.5;Inherit;False;color
|
||||
= Volumetrics(color, WorldSpacePosition)@;4;True;2;True;color;FLOAT4;0,0,0,0;InOut;;Inherit;False;True;WorldSpacePosition;FLOAT3;0,0,0;In;;Inherit;False;My
|
||||
Custom Expression;False;False;0;3;0;FLOAT;0;False;1;FLOAT4;0,0,0,0;False;2;FLOAT3;0,0,0;False;2;FLOAT;0;FLOAT4;2\nNode;AmplifyShaderEditor.FunctionOutput;0;0,0;Inherit;False;True;-1;Output;0;False;1;0;FLOAT4;0,0,0,0;False;1;FLOAT4;0\nWireConnection;1;1;2;0\nWireConnection;1;2;3;0\nWireConnection;0;0;1;2\nASEEND*/\n//CHKSM=4259289F1FB25D951F290E3F7282448CF5B9B51B"
|
||||
m_functionName:
|
||||
m_description: Custom intagration of volumetrics meant for unlit template which
|
||||
doesn't store surface world position by default.
|
||||
m_additionalIncludes:
|
||||
m_additionalIncludes: []
|
||||
m_outsideIncludes: []
|
||||
m_additionalPragmas:
|
||||
m_additionalPragmas: []
|
||||
m_outsidePragmas: []
|
||||
m_additionalDirectives:
|
||||
m_validData: 0
|
||||
m_isDirty: 1
|
||||
m_moduleName: ' Additional Directives'
|
||||
m_independentModule: 1
|
||||
m_additionalDirectives:
|
||||
- {fileID: 0}
|
||||
m_shaderFunctionDirectives: []
|
||||
m_nativeDirectives: []
|
||||
m_nativeDirectivesIndex: -1
|
||||
m_nativeDirectivesFoldout: 0
|
||||
m_directivesSaveItems:
|
||||
- LineType: 2
|
||||
LineValue: 'multi_compile _ _VOLUMETRICS_ENABLED '
|
||||
GUIDToggle: 0
|
||||
GUIDValue:
|
||||
Origin: 2
|
||||
m_nodeCategory: 3
|
||||
m_customNodeCategory:
|
||||
m_previewPosition: 0
|
||||
m_hidden: 0
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 466c705646f921043a9da6880d2c17c4
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
|
@ -0,0 +1,62 @@
|
|||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &11400000
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 78b2425a2284af743826c689403a4924, type: 3}
|
||||
m_Name: VolumetricsUnlitMul2x
|
||||
m_EditorClassIdentifier:
|
||||
m_functionInfo: "// Made with Amplify Shader Editor\n// Available at the Unity
|
||||
Asset Store - http://u3d.as/y3X \n/*ASEBEGIN\nVersion=18935\n2028;88;1920;1019;1630.69;352.8253;1.000001;True;True\nNode;AmplifyShaderEditor.FunctionInput;2;-664,-48.5;Inherit;False;Color;4;0;False;1;0;FLOAT4;0,0,0,0;False;1;FLOAT4;0\nNode;AmplifyShaderEditor.FunctionInput;3;-730,41.5;Inherit;False;World
|
||||
Space Position;3;1;False;1;0;FLOAT3;0,0,0;False;1;FLOAT3;0\nNode;AmplifyShaderEditor.SwizzleNode;14;-707.3295,482.3381;Inherit;False;FLOAT2;0;1;2;3;1;0;FLOAT4;0,0,0,0;False;1;FLOAT2;0\nNode;AmplifyShaderEditor.ScreenPosInputsNode;23;-974.9197,508.9712;Inherit;False;0;False;0;5;FLOAT4;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4\nNode;AmplifyShaderEditor.CustomExpressionNode;1;-421.9999,-33.5;Inherit;False;$$#if
|
||||
defined(_VOLUMETRICS_ENABLED) && !defined(SHADER_API_MOBILE)$ half3 FroxelColor
|
||||
= GetVolumetricColor(positionWS).rgb@$ //color.rgb = 0.5 *( 2.0 * TargetColor.rgb
|
||||
* color.rgb + FroxelColor) / (TargetColor.rgb + FroxelColor)@$ color.rgb =
|
||||
color.rgb - 0.5* (2.0*color.rgb - 1.0) * FroxelColor / TargetColor.rgb@$#endif$$;7;Create;3;True;color;FLOAT4;0,0,0,0;InOut;;Inherit;False;True;positionWS;FLOAT3;0,0,0;In;;Inherit;False;True;TargetColor;FLOAT3;0,0,0;In;;Inherit;False;My
|
||||
Custom Expression;False;False;0;;False;4;0;FLOAT;0;False;1;FLOAT4;0,0,0,0;False;2;FLOAT3;0,0,0;False;3;FLOAT3;0,0,0;False;2;FLOAT;0;FLOAT4;2\nNode;AmplifyShaderEditor.CustomExpressionNode;24;-558.2775,423.7393;Inherit;False;#if
|
||||
defined(_VOLUMETRICS_ENABLED) && !defined(SHADER_API_MOBILE)$screenCol = SampleSceneColor(uv)@$#endif;7;Create;2;True;uv;FLOAT2;0,0;In;;Inherit;False;True;screenCol;FLOAT3;0,0,0;Out;;Inherit;False;My
|
||||
Custom Expression;True;False;0;;False;3;0;FLOAT;0;False;1;FLOAT2;0,0;False;2;FLOAT3;0,0,0;False;2;FLOAT;0;FLOAT3;3\nNode;AmplifyShaderEditor.FunctionOutput;0;0,0;Inherit;False;True;-1;Output;0;False;1;0;FLOAT4;0,0,0,0;False;1;FLOAT4;0\nWireConnection;14;0;23;0\nWireConnection;1;1;2;0\nWireConnection;1;2;3;0\nWireConnection;1;3;24;3\nWireConnection;24;1;14;0\nWireConnection;0;0;1;2\nASEEND*/\n//CHKSM=941B69BB15E5C231684303306784AB302CD165D6"
|
||||
m_functionName:
|
||||
m_description: Custom intagration of volumetrics meant for unlit template which
|
||||
doesn't store surface world position by default.
|
||||
m_additionalIncludes:
|
||||
m_additionalIncludes: []
|
||||
m_outsideIncludes: []
|
||||
m_additionalPragmas:
|
||||
m_additionalPragmas: []
|
||||
m_outsidePragmas: []
|
||||
m_additionalDirectives:
|
||||
m_validData: 0
|
||||
m_isDirty: 1
|
||||
m_moduleName: ' Additional Directives'
|
||||
m_independentModule: 1
|
||||
m_customEdited: 0
|
||||
m_additionalDirectives:
|
||||
- {fileID: 0}
|
||||
- {fileID: 0}
|
||||
m_shaderFunctionDirectives: []
|
||||
m_nativeDirectives: []
|
||||
m_nativeDirectivesIndex: -1
|
||||
m_nativeDirectivesFoldout: 0
|
||||
m_directivesSaveItems:
|
||||
- LineType: 2
|
||||
LineValue: 'multi_compile _ _VOLUMETRICS_ENABLED '
|
||||
GUIDToggle: 0
|
||||
GUIDValue:
|
||||
Origin: 2
|
||||
- LineType: 0
|
||||
LineValue: Packages/com.unity.render-pipelines.universal/ShaderLibrary/DeclareOpaqueTexture.hlsl
|
||||
GUIDToggle: 0
|
||||
GUIDValue:
|
||||
Origin: 2
|
||||
m_nodeCategory: 3
|
||||
m_customNodeCategory:
|
||||
m_previewPosition: 0
|
||||
m_hidden: 0
|
||||
m_url:
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 38fe892563f364c4783d208b2aef2277
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
fileFormatVersion: 2
|
||||
guid: ce191afb9ad21304a9f9ae221c149fe9
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 09d096edd1dfe554cb4da8ec95c9d797
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 338f75ef6cddb914e94f4a704c60d7ec
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
fileFormatVersion: 2
|
||||
guid: b57e0b30bf622cb41986a6e45e532eb9
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
File diff suppressed because it is too large
Load diff
|
|
@ -0,0 +1,9 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 94348b07e5e8bab40bd6c8a1e3df54cd
|
||||
timeCreated: 1520620337
|
||||
licenseType: Pro
|
||||
ShaderImporter:
|
||||
defaultTextures: []
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
File diff suppressed because it is too large
Load diff
|
|
@ -0,0 +1,9 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 2992e84f91cbeb14eab234972e07ea9d
|
||||
timeCreated: 1568647145
|
||||
licenseType: Pro
|
||||
ShaderImporter:
|
||||
defaultTextures: []
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
|
@ -0,0 +1,51 @@
|
|||
using System.IO;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEditor;
|
||||
using System.Text;
|
||||
|
||||
#if SLZ_RENDERPIPELINE_DEV
|
||||
public static class CreateGUIDList
|
||||
{
|
||||
[MenuItem("Stress Level Zero/Create GUID list/SLZShaders")]
|
||||
public static void CreateSLZShaderList()
|
||||
{
|
||||
string dir = Path.Combine(Path.GetDirectoryName(Application.dataPath), "Packages/com.unity.render-pipelines.universal/ModResources/SLZShaders~");
|
||||
CreateListFromDirectory(dir);
|
||||
}
|
||||
|
||||
[MenuItem("Stress Level Zero/Create GUID list/Amplify")]
|
||||
public static void CreateAmplifyList()
|
||||
{
|
||||
string dir = Path.Combine(Path.GetDirectoryName(Application.dataPath), "Packages/com.unity.render-pipelines.universal/ModResources/AmplifyExtensions~");
|
||||
CreateListFromDirectory(dir);
|
||||
}
|
||||
|
||||
internal static void CreateListFromDirectory(string dir)
|
||||
{
|
||||
|
||||
string[] metaFiles = Directory.GetFiles(dir, "*.meta", SearchOption.AllDirectories);
|
||||
int metaCount = metaFiles.Length;
|
||||
StringBuilder sb = new StringBuilder(33 * metaCount);
|
||||
|
||||
for (int i = 0; i < metaCount; i++)
|
||||
{
|
||||
// Don't add folder meta files to list, we don't want to delete directories in case the user added other files to them!
|
||||
if (!Directory.Exists(metaFiles[i].Substring(0, metaFiles[i].Length - 5)))
|
||||
{
|
||||
Debug.Log(metaFiles[i]);
|
||||
using (StreamReader meta = new StreamReader(metaFiles[i]))
|
||||
{
|
||||
// Read two lines, the GUID is always on the second line, and starts with "guid: " followed by the 32 character GUID
|
||||
meta.ReadLine();
|
||||
string guid = meta.ReadLine().Substring(6, 32);
|
||||
sb.Append(guid + "\n");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
File.WriteAllText(Path.Combine(dir, ".GUIDList.txt"), sb.ToString());
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 5336b4ecece182945ae9c95b68f11dd6
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
|
@ -0,0 +1,130 @@
|
|||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
|
||||
namespace SLZ.URPModResources
|
||||
{
|
||||
/// <summary>
|
||||
/// Extracts assets from hidden folders inside the URP package into the project. Made as a replacement for Unity's sample system
|
||||
/// that we were using before to address the issue that unity installs the assets to a path relative to the package version number.
|
||||
/// Shader includes rely on absolute paths, so the sample system is unsuitable for this usecase. Also the samples are buried in
|
||||
/// Unity's package manager so most users won't even know they exist.
|
||||
/// </summary>
|
||||
public static class ExtractAssets
|
||||
{
|
||||
#if !MARROW_PROJECT
|
||||
static string pkgPathShader = "Packages/com.unity.render-pipelines.universal/ModResources/SLZShaders~/";
|
||||
static string pkgPathAmplify = "Packages/com.unity.render-pipelines.universal/ModResources/AmplifyExtensions~/";
|
||||
static string assetPathShader = "Assets/SLZShaders/";
|
||||
static string assetPathAmplify = "Assets/AmplifyShaderEditor/";
|
||||
|
||||
/// <summary>
|
||||
/// Extract the bonelab shader files into the assets folder.
|
||||
/// </summary>
|
||||
/// <param name="cleanInstall">Do we delete all files in the project with the same GUID's those in this package? GUIDs come from .GUIDList.txt in the package folder</param>
|
||||
internal static void ExtractShaders(bool cleanInstall)
|
||||
{
|
||||
string projectPath = Path.GetDirectoryName(Application.dataPath);
|
||||
string packagePath = Path.Combine(projectPath, pkgPathShader);
|
||||
string assetsPath = Path.Combine(projectPath, assetPathShader);
|
||||
if (cleanInstall)
|
||||
{
|
||||
string GUIDListPath = packagePath + ".GUIDList.txt";
|
||||
if (File.Exists(GUIDListPath))
|
||||
{
|
||||
NukeOldFiles(GUIDListPath);
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.LogWarning("Missing GUID list, will not attempt to delete old versions of files. GUIDs may get mangled if imported assets have same GUIDs as other assets in the project!");
|
||||
}
|
||||
}
|
||||
CopyDirectory(packagePath, assetsPath);
|
||||
AssetDatabase.Refresh();
|
||||
}
|
||||
|
||||
internal static void ExtractAmplify(bool cleanInstall)
|
||||
{
|
||||
string projectPath = Path.GetDirectoryName(Application.dataPath);
|
||||
string packagePath = Path.Combine(projectPath, pkgPathAmplify);
|
||||
string assetsPath = Path.Combine(projectPath, assetPathAmplify);
|
||||
string GUIDListPath = packagePath + ".GUIDList.txt";
|
||||
if (cleanInstall)
|
||||
{
|
||||
if (File.Exists(GUIDListPath))
|
||||
{
|
||||
NukeOldFiles(GUIDListPath);
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.LogWarning("Missing GUID list, will not attempt to delete old versions of files. GUIDs may get mangled if imported assets have same GUIDs as other assets in the project!");
|
||||
}
|
||||
}
|
||||
CopyDirectory(packagePath, assetsPath);
|
||||
AssetDatabase.Refresh();
|
||||
}
|
||||
|
||||
static void NukeOldFiles(string GUIDListPath)
|
||||
{
|
||||
string projectPath = Path.GetDirectoryName(Application.dataPath);
|
||||
List<string> deletePaths = new List<string>();
|
||||
using (StreamReader sr = new StreamReader(GUIDListPath))
|
||||
{
|
||||
string guid;
|
||||
while ((guid = sr.ReadLine()) != null && guid.Length >= 32)
|
||||
{
|
||||
guid = guid.Substring(0, 32);
|
||||
string assetPath = AssetDatabase.GUIDToAssetPath(guid);
|
||||
if (!string.IsNullOrEmpty(assetPath) && File.Exists(Path.Combine(projectPath, assetPath)) && !assetPath.StartsWith("Packages"))
|
||||
{
|
||||
deletePaths.Add(assetPath);
|
||||
//AssetDatabase.DeleteAsset(assetPath);
|
||||
//File.Delete(Path.Combine(projectPath, assetPath));
|
||||
//File.Delete(Path.Combine(projectPath, assetPath + ".meta"));
|
||||
}
|
||||
}
|
||||
}
|
||||
List<string> failedPaths = new List<string>();
|
||||
AssetDatabase.DeleteAssets(deletePaths.ToArray(), failedPaths);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Copied from Microsoft docs (https://learn.microsoft.com/en-us/dotnet/standard/io/how-to-copy-directories), kinda silly that System.IO has no method for copying a folder.
|
||||
/// </summary>
|
||||
/// <param name="sourceDir">Directory to copy from</param>
|
||||
/// <param name="destinationDir">Directory to copy to</param>
|
||||
/// <exception cref="DirectoryNotFoundException"></exception>
|
||||
static void CopyDirectory(string sourceDir, string destinationDir)
|
||||
{
|
||||
// Get information about the source directory
|
||||
var dir = new DirectoryInfo(sourceDir);
|
||||
|
||||
// Check if the source directory exists
|
||||
if (!dir.Exists)
|
||||
throw new DirectoryNotFoundException($"Source directory not found: {dir.FullName}");
|
||||
|
||||
// Cache directories before we start copying
|
||||
DirectoryInfo[] dirs = dir.GetDirectories();
|
||||
|
||||
// Create the destination directory
|
||||
Directory.CreateDirectory(destinationDir);
|
||||
|
||||
// Get the files in the source directory and copy to the destination directory
|
||||
foreach (FileInfo file in dir.GetFiles())
|
||||
{
|
||||
string targetFilePath = Path.Combine(destinationDir, file.Name);
|
||||
file.CopyTo(targetFilePath, true);
|
||||
}
|
||||
|
||||
|
||||
foreach (DirectoryInfo subDir in dirs)
|
||||
{
|
||||
string newDestinationDir = Path.Combine(destinationDir, subDir.Name);
|
||||
CopyDirectory(subDir.FullName, newDestinationDir);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: d21297ceeee25bf44aa884d615a5eb76
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
{
|
||||
"name": "ModResources",
|
||||
"rootNamespace": "",
|
||||
"references": [],
|
||||
"includePlatforms": [
|
||||
"Editor"
|
||||
],
|
||||
"excludePlatforms": [],
|
||||
"allowUnsafeCode": false,
|
||||
"overrideReferences": false,
|
||||
"precompiledReferences": [],
|
||||
"autoReferenced": true,
|
||||
"defineConstraints": [
|
||||
"!MARROW_PROJECT"
|
||||
],
|
||||
"versionDefines": [],
|
||||
"noEngineReferences": false
|
||||
}
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
fileFormatVersion: 2
|
||||
guid: c1f06077335a35f44b12c008a50955fa
|
||||
AssemblyDefinitionImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
// Dummy file to make ASMDEF work
|
||||
public class ModResourcesDummy
|
||||
{
|
||||
}
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 27aad25e4858cf94183ce4601053970c
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
|
@ -0,0 +1,35 @@
|
|||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEditor;
|
||||
using UnityEditor.Presets;
|
||||
using UnityEngine;
|
||||
using Object = UnityEngine.Object;
|
||||
|
||||
|
||||
namespace SLZ.URPModResources
|
||||
{
|
||||
public static class PlatformQualitySetter
|
||||
{
|
||||
const string ProjectQSPath = "ProjectSettings/QualitySettings.asset";
|
||||
const string PcPresetPath = "Packages/com.unity.render-pipelines.universal/Presets/QualitySettings_PC.preset";
|
||||
const string QuestPresetPath = "Packages/com.unity.render-pipelines.universal/Presets/QualitySettings_Quest.preset";
|
||||
static readonly int[] questSettingsIndex = { 3 };
|
||||
static readonly int[] standaloneSettingsIndex = { 2, 1, 0 };
|
||||
public static void OverrideQualitySettings(BuildTarget target)
|
||||
{
|
||||
|
||||
Object oldQS = AssetDatabase.LoadAllAssetsAtPath(ProjectQSPath)[0];
|
||||
Preset newQS;
|
||||
if (target == BuildTarget.Android)
|
||||
{
|
||||
newQS = AssetDatabase.LoadAssetAtPath<Preset>(QuestPresetPath);
|
||||
}
|
||||
else
|
||||
{
|
||||
newQS = AssetDatabase.LoadAssetAtPath<Preset>(PcPresetPath);
|
||||
}
|
||||
newQS.ApplyTo(oldQS);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: f7190b82ff04cd745a02ce7094ccc7fb
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
|
@ -0,0 +1,39 @@
|
|||
e95b31b7241745c479b6b9574209d1f9
|
||||
6bf3d81d08a4ff343b22619a187bb249
|
||||
4c21875978f9ed04d9edcf6d97e9ed54
|
||||
b2e867ce46fe95046aaceb0155a651ad
|
||||
f71cd8ed99405284ab09d18bf11d03ab
|
||||
44cd4284ecfc46c4c97f571b3681e0c6
|
||||
ae467daa42d17ee45b6947a14ec8ec96
|
||||
7276a03ae0651b1419b50e2c76272732
|
||||
f05a5c6a2a705054d8547ebd87b58073
|
||||
97791a0150e87a14bbe1a5d46267be8a
|
||||
93a4eb99edd7b9c42bfb913f0ee52b3e
|
||||
4a1250fb7f0da2e4e96bd2e34ce4a8ea
|
||||
24617ef4b8ecbe74984e0955867cffd4
|
||||
a0cae63ef60b7da4f9cb90b8cdb4ce4e
|
||||
86c42a8335fb06241a674530f1fa24c5
|
||||
6aab105c75192124887c893201ce93e0
|
||||
225aec2e7a259b642a9fa1a4d10d7aac
|
||||
c96b15076e0088349a95505e52f5a12a
|
||||
93c33570d60341c439e50150832c5173
|
||||
81cc8fbe3bd52d149b2b91936b92bfb8
|
||||
6dc78741d54741a4c90a0fb74bd75f20
|
||||
3190a336b6bd4484d911017dd0fc15ba
|
||||
ebf91ac3a3d63fe42ace3e3a75c5153a
|
||||
57dc2f6a8812542439eb1e60c355d9a2
|
||||
75ebf02c7324c2944904e47c12cb421b
|
||||
e48b7c1f5379ceb4687833196130a9dd
|
||||
0e6e0041457dfeb47936aa37f7c4bfdf
|
||||
75872890b046c074fac20ab6d18e52b1
|
||||
40dd6881c3760054cacc50fdba7554dc
|
||||
36686d6671a56b04f9401216e0ff9ae5
|
||||
c156fe6f1c50d864f8ceb85b935236f7
|
||||
390d76c4ec3c32e4e8ecc2b49aa78a1c
|
||||
005850956c06e3c4d9126500376c9a40
|
||||
88f1b8e9d502e19419d88bca2cab94da
|
||||
2313d59684d119840a78fee73c48959a
|
||||
2df13d630bf74324fbefa9003b6544b3
|
||||
03859193eb793184ca8cc47738d7109d
|
||||
f42ab72a6a8465649be290d03a8f1981
|
||||
2a6fc1acbba5a6045a0692bfb9a7a8f2
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
"displayName":"SLZ Bonelab Shaders",
|
||||
"description": "A collection of shaders that are found in Bonelab",
|
||||
"createSeparatePackage": false
|
||||
}
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 788eda7870482d742ab84d912eeaef30
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
# Sky Prefab For Bonelab
|
||||
|
||||
This package contains a prefab for rendering sky in Bonelab. Unity's default
|
||||
sky rendering is turned off due to it being incompatible with the fog and vol-
|
||||
umetric systems we use. The included prefab can be used as a replacement for
|
||||
the default sky. The prefab is simply an enormous mesh with no occlusion and
|
||||
a special shader. Note that the included shader (SLZ/Sky With Fog) must only be
|
||||
used with the included mesh (Sky_Mesh) as the shader expects a single triangle
|
||||
mesh. Additionally, Sky_Mesh has a 65x65x65 kilometer bounding box to ensure it
|
||||
is always rendered. The included prefab further has dynamic occlusion disabled
|
||||
to ensure it never gets culled, as well as all unnecessary lighting information
|
||||
disabled. Do not enable the Occluder or Occludee Static flags on the prefab to
|
||||
ensure the mesh is never occluded.
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 86c42a8335fb06241a674530f1fa24c5
|
||||
TextScriptImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
fileFormatVersion: 2
|
||||
guid: d52f8debff15ed04b89c365c5b348eb0
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
|
@ -0,0 +1,94 @@
|
|||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!21 &2100000
|
||||
Material:
|
||||
serializedVersion: 8
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: Sky_Example
|
||||
m_Shader: {fileID: 4800000, guid: 75ebf02c7324c2944904e47c12cb421b, type: 3}
|
||||
m_ValidKeywords: []
|
||||
m_InvalidKeywords: []
|
||||
m_LightmapFlags: 4
|
||||
m_EnableInstancingVariants: 0
|
||||
m_DoubleSidedGI: 0
|
||||
m_CustomRenderQueue: -1
|
||||
stringTagMap: {}
|
||||
disabledShaderPasses: []
|
||||
m_SavedProperties:
|
||||
serializedVersion: 3
|
||||
m_TexEnvs:
|
||||
- _BaseMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _BumpMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _EmissionMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MainTex:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MetallicGlossMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _SkyTex:
|
||||
m_Texture: {fileID: 8900000, guid: e48b7c1f5379ceb4687833196130a9dd, type: 3}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- unity_Lightmaps:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- unity_LightmapsInd:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- unity_ShadowMasks:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_Ints: []
|
||||
m_Floats:
|
||||
- _AlphaClip: 0
|
||||
- _Blend: 0
|
||||
- _BumpScale: 1
|
||||
- _ClearCoatMask: 0
|
||||
- _ClearCoatSmoothness: 0
|
||||
- _Cull: 2
|
||||
- _Cutoff: 0.5
|
||||
- _DetailAlbedoMapScale: 1
|
||||
- _DetailNormalMapScale: 1
|
||||
- _DetailSmoothnessMapScale: 1
|
||||
- _DstBlend: 0
|
||||
- _FogDist: 0.1
|
||||
- _GlossMapScale: 0
|
||||
- _Glossiness: 0
|
||||
- _GlossyReflections: 0
|
||||
- _Metallic: 0
|
||||
- _OffsetFactor: 0
|
||||
- _OffsetUnits: 0
|
||||
- _QueueOffset: 0
|
||||
- _ReceiveShadows: 1
|
||||
- _Smoothness: 1
|
||||
- _SrcBlend: 1
|
||||
- _Surface: 0
|
||||
- _ZWrite: 1
|
||||
m_Colors:
|
||||
- _BaseColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
- _Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
|
||||
- _SkyColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_BuildTextureStacks: []
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 3190a336b6bd4484d911017dd0fc15ba
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 2100000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 3c33eff4ea614ba4285462f29506cf94
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
|
@ -0,0 +1,167 @@
|
|||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!43 &4300000
|
||||
Mesh:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: Sky_Mesh
|
||||
serializedVersion: 11
|
||||
m_SubMeshes:
|
||||
- serializedVersion: 2
|
||||
firstByte: 0
|
||||
indexCount: 3
|
||||
topology: 0
|
||||
baseVertex: 0
|
||||
firstVertex: 0
|
||||
vertexCount: 3
|
||||
localAABB:
|
||||
m_Center: {x: 1, y: 1, z: 0}
|
||||
m_Extent: {x: 2, y: 2, z: 0}
|
||||
m_Shapes:
|
||||
vertices: []
|
||||
shapes: []
|
||||
channels: []
|
||||
fullWeights: []
|
||||
m_BindPose: []
|
||||
m_BoneNameHashes:
|
||||
m_RootBoneNameHash: 0
|
||||
m_BonesAABB: []
|
||||
m_VariableBoneCountWeights:
|
||||
m_Data:
|
||||
m_MeshCompression: 0
|
||||
m_IsReadable: 1
|
||||
m_KeepVertices: 1
|
||||
m_KeepIndices: 1
|
||||
m_IndexFormat: 0
|
||||
m_IndexBuffer: 000001000200
|
||||
m_VertexData:
|
||||
serializedVersion: 3
|
||||
m_VertexCount: 3
|
||||
m_Channels:
|
||||
- stream: 0
|
||||
offset: 0
|
||||
format: 0
|
||||
dimension: 3
|
||||
- stream: 0
|
||||
offset: 0
|
||||
format: 0
|
||||
dimension: 0
|
||||
- stream: 0
|
||||
offset: 0
|
||||
format: 0
|
||||
dimension: 0
|
||||
- stream: 0
|
||||
offset: 0
|
||||
format: 0
|
||||
dimension: 0
|
||||
- stream: 0
|
||||
offset: 12
|
||||
format: 0
|
||||
dimension: 2
|
||||
- stream: 0
|
||||
offset: 0
|
||||
format: 0
|
||||
dimension: 0
|
||||
- stream: 0
|
||||
offset: 0
|
||||
format: 0
|
||||
dimension: 0
|
||||
- stream: 0
|
||||
offset: 0
|
||||
format: 0
|
||||
dimension: 0
|
||||
- stream: 0
|
||||
offset: 0
|
||||
format: 0
|
||||
dimension: 0
|
||||
- stream: 0
|
||||
offset: 0
|
||||
format: 0
|
||||
dimension: 0
|
||||
- stream: 0
|
||||
offset: 0
|
||||
format: 0
|
||||
dimension: 0
|
||||
- stream: 0
|
||||
offset: 0
|
||||
format: 0
|
||||
dimension: 0
|
||||
- stream: 0
|
||||
offset: 0
|
||||
format: 0
|
||||
dimension: 0
|
||||
- stream: 0
|
||||
offset: 0
|
||||
format: 0
|
||||
dimension: 0
|
||||
m_DataSize: 60
|
||||
_typelessdata: 000080bf0000404000000000000000000000803f000080bf000080bf00000000000000000000000000004040000080bf000000000000803f00000000
|
||||
m_CompressedMesh:
|
||||
m_Vertices:
|
||||
m_NumItems: 0
|
||||
m_Range: 0
|
||||
m_Start: 0
|
||||
m_Data:
|
||||
m_BitSize: 0
|
||||
m_UV:
|
||||
m_NumItems: 0
|
||||
m_Range: 0
|
||||
m_Start: 0
|
||||
m_Data:
|
||||
m_BitSize: 0
|
||||
m_Normals:
|
||||
m_NumItems: 0
|
||||
m_Range: 0
|
||||
m_Start: 0
|
||||
m_Data:
|
||||
m_BitSize: 0
|
||||
m_Tangents:
|
||||
m_NumItems: 0
|
||||
m_Range: 0
|
||||
m_Start: 0
|
||||
m_Data:
|
||||
m_BitSize: 0
|
||||
m_Weights:
|
||||
m_NumItems: 0
|
||||
m_Data:
|
||||
m_BitSize: 0
|
||||
m_NormalSigns:
|
||||
m_NumItems: 0
|
||||
m_Data:
|
||||
m_BitSize: 0
|
||||
m_TangentSigns:
|
||||
m_NumItems: 0
|
||||
m_Data:
|
||||
m_BitSize: 0
|
||||
m_FloatColors:
|
||||
m_NumItems: 0
|
||||
m_Range: 0
|
||||
m_Start: 0
|
||||
m_Data:
|
||||
m_BitSize: 0
|
||||
m_BoneIndices:
|
||||
m_NumItems: 0
|
||||
m_Data:
|
||||
m_BitSize: 0
|
||||
m_Triangles:
|
||||
m_NumItems: 0
|
||||
m_Data:
|
||||
m_BitSize: 0
|
||||
m_UVInfo: 0
|
||||
m_LocalAABB:
|
||||
m_Center: {x: 0, y: 0, z: 0}
|
||||
m_Extent: {x: 32768, y: 32768, z: 32768}
|
||||
m_MeshUsageFlags: 0
|
||||
m_CookingOptions: 30
|
||||
m_BakedConvexCollisionMesh:
|
||||
m_BakedTriangleCollisionMesh:
|
||||
m_MeshMetrics[0]: 1
|
||||
m_MeshMetrics[1]: 1
|
||||
m_MeshOptimizationFlags: 1
|
||||
m_StreamData:
|
||||
serializedVersion: 2
|
||||
offset: 0
|
||||
size: 0
|
||||
path:
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
fileFormatVersion: 2
|
||||
guid: ebf91ac3a3d63fe42ace3e3a75c5153a
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
fileFormatVersion: 2
|
||||
guid: dfda820ea5fa26a4fad111042abd4a98
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
|
@ -0,0 +1,85 @@
|
|||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!1 &531086027732950538
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1713422862066233390}
|
||||
- component: {fileID: 2453626235171082250}
|
||||
- component: {fileID: 3742906364795765522}
|
||||
m_Layer: 0
|
||||
m_Name: Sky_Prefab
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 64
|
||||
m_IsActive: 1
|
||||
--- !u!4 &1713422862066233390
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 531086027732950538}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!33 &2453626235171082250
|
||||
MeshFilter:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 531086027732950538}
|
||||
m_Mesh: {fileID: 4300000, guid: ebf91ac3a3d63fe42ace3e3a75c5153a, type: 2}
|
||||
--- !u!23 &3742906364795765522
|
||||
MeshRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 531086027732950538}
|
||||
m_Enabled: 1
|
||||
m_CastShadows: 0
|
||||
m_ReceiveShadows: 1
|
||||
m_DynamicOccludee: 0
|
||||
m_StaticShadowCaster: 0
|
||||
m_MotionVectors: 2
|
||||
m_LightProbeUsage: 0
|
||||
m_ReflectionProbeUsage: 1
|
||||
m_RayTracingMode: 2
|
||||
m_RayTraceProcedural: 0
|
||||
m_RenderingLayerMask: 1
|
||||
m_RendererPriority: 0
|
||||
m_Materials:
|
||||
- {fileID: 2100000, guid: 3190a336b6bd4484d911017dd0fc15ba, type: 2}
|
||||
m_StaticBatchInfo:
|
||||
firstSubMesh: 0
|
||||
subMeshCount: 0
|
||||
m_StaticBatchRoot: {fileID: 0}
|
||||
m_ProbeAnchor: {fileID: 0}
|
||||
m_LightProbeVolumeOverride: {fileID: 0}
|
||||
m_ScaleInLightmap: 1
|
||||
m_ReceiveGI: 1
|
||||
m_PreserveUVs: 0
|
||||
m_IgnoreNormalsForChartDetection: 0
|
||||
m_ImportantGI: 0
|
||||
m_StitchLightmapSeams: 1
|
||||
m_SelectedEditorRenderState: 3
|
||||
m_MinimumChartSize: 4
|
||||
m_AutoUVMaxDistance: 0.5
|
||||
m_AutoUVMaxAngle: 89
|
||||
m_LightmapParameters: {fileID: 0}
|
||||
m_SortingLayerID: 0
|
||||
m_SortingLayer: 0
|
||||
m_SortingOrder: 0
|
||||
m_AdditionalVertexStreams: {fileID: 0}
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 57dc2f6a8812542439eb1e60c355d9a2
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
fileFormatVersion: 2
|
||||
guid: ca716302fae88144cb8018d9ea2dd61c
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
|
@ -0,0 +1,122 @@
|
|||
Shader "SLZ/Sky With Fog"
|
||||
{
|
||||
Properties
|
||||
{
|
||||
_SkyTex ("Sky Texture", CUBE) = "black" {}
|
||||
[HDR] _SkyColor ("Sky Color", Color) = (1,1,1,1)
|
||||
_FogDist ("Fog Max Distance (0 to camera far clip)", Range(0,1)) = 1.0
|
||||
}
|
||||
SubShader
|
||||
{
|
||||
Tags {"RenderPipeline" = "UniversalPipeline" "RenderType" = "Opaque" "Queue" = "AlphaTest+51" "IgnoreProjector"="True"}
|
||||
Blend One Zero
|
||||
ZWrite Off
|
||||
ZTest LEqual
|
||||
//Offset 1,1
|
||||
ColorMask RGBA
|
||||
LOD 100
|
||||
Cull Off
|
||||
|
||||
Pass
|
||||
{
|
||||
Name "Forward"
|
||||
Tags {"Lightmode"="UniversalForward"}
|
||||
HLSLPROGRAM
|
||||
|
||||
#pragma vertex vert
|
||||
#pragma fragment frag
|
||||
#pragma exclude_renderers gles
|
||||
#pragma multi_compile_fragment _ _VOLUMETRICS_ENABLED
|
||||
#pragma multi_compile_fragment _ FOG_LINEAR FOG_EXP2
|
||||
#define SHADERPASS SHADERPASS_FORWARD
|
||||
|
||||
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Common.hlsl"
|
||||
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Color.hlsl"
|
||||
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Texture.hlsl"
|
||||
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl"
|
||||
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl"
|
||||
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl"
|
||||
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Shadows.hlsl"
|
||||
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/ShaderGraphFunctions.hlsl"
|
||||
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/DBuffer.hlsl"
|
||||
#include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/ShaderPass.hlsl"
|
||||
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Packing.hlsl"
|
||||
|
||||
|
||||
struct appdata
|
||||
{
|
||||
//float4 vertex : POSITION;
|
||||
half2 uv0 : TEXCOORD0;
|
||||
uint vertexID : SV_VertexID;
|
||||
UNITY_VERTEX_INPUT_INSTANCE_ID
|
||||
};
|
||||
|
||||
struct v2f
|
||||
{
|
||||
float4 vertex : SV_POSITION;
|
||||
float2 uv0 : TEXCOORD0;
|
||||
float4 wPos_xyz_fog_x : TEXCOORD1;
|
||||
UNITY_VERTEX_INPUT_INSTANCE_ID
|
||||
UNITY_VERTEX_OUTPUT_STEREO
|
||||
};
|
||||
|
||||
TEXTURECUBE(_SkyTex);
|
||||
SamplerState sampler_SkyTex;
|
||||
CBUFFER_START(UnityPerMaterial)
|
||||
half4 _SkyColor;
|
||||
float _FogDist;
|
||||
CBUFFER_END
|
||||
|
||||
|
||||
/* Gets the position of a vertex as a part of a right triangle that completely covers the screen
|
||||
* Assumes a single triangle mesh, with the positions based on the vertex's ID.
|
||||
* CCW order
|
||||
* 0 : 0,1 0
|
||||
* 1 : 0,0 | \
|
||||
* 2 : 1,0 1--2
|
||||
*/
|
||||
float4 GetQuadVertexPosition2(uint vertexID, float z = UNITY_NEAR_CLIP_VALUE)
|
||||
{
|
||||
uint topBit = vertexID >> 1u;
|
||||
uint botBit = (vertexID & 1u);
|
||||
float y = 1.0f - ((vertexID & 2u) >> 1);
|
||||
float x = (vertexID & 1u);//1 - (topBit + botBit) & 1; // produces 1 for indices 0,3 and 0 for 1,2
|
||||
return float4(x, y, z, 1.0);
|
||||
}
|
||||
v2f vert(appdata v)
|
||||
{
|
||||
v2f o;
|
||||
UNITY_SETUP_INSTANCE_ID(v);
|
||||
UNITY_TRANSFER_INSTANCE_ID(v, o);
|
||||
UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o);
|
||||
//float z = (rcp(_SkyDist) - _ZBufferParams.y) / (_ZBufferParams.x); // Transform from linear 0-1 depth to clipspace Z
|
||||
float4 clipQuad = GetQuadVertexPosition(v.vertexID, UNITY_RAW_FAR_CLIP_VALUE);
|
||||
clipQuad.xy = 4.0f * clipQuad.xy - 1.0f;
|
||||
//clipQuad.xy = 0.5f * clipQuad.xy - 0.5f;
|
||||
float4 wPos = mul(UNITY_MATRIX_I_VP, clipQuad);
|
||||
o.wPos_xyz_fog_x.xyz = wPos.xyz / wPos.w;
|
||||
o.vertex = clipQuad;
|
||||
half clipZ_0Far = lerp(_ProjectionParams.y, _ProjectionParams.z, _FogDist);
|
||||
o.wPos_xyz_fog_x.w = unity_FogParams.x * clipZ_0Far;
|
||||
return o;
|
||||
}
|
||||
|
||||
half4 frag(v2f i) : SV_Target
|
||||
{
|
||||
UNITY_SETUP_INSTANCE_ID(i);
|
||||
UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(i);
|
||||
|
||||
float3 viewDir = normalize(float3(i.wPos_xyz_fog_x.xyz - _WorldSpaceCameraPos));
|
||||
half4 col = SAMPLE_TEXTURECUBE_LOD(_SkyTex, sampler_SkyTex, viewDir, 0);
|
||||
col *= _SkyColor;
|
||||
|
||||
col.rgb = MixFog(col.rgb, viewDir, i.wPos_xyz_fog_x.w);
|
||||
|
||||
col = Volumetrics(col, i.wPos_xyz_fog_x.xyz);
|
||||
|
||||
return col;
|
||||
}
|
||||
ENDHLSL
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 75ebf02c7324c2944904e47c12cb421b
|
||||
ShaderImporter:
|
||||
externalObjects: {}
|
||||
defaultTextures: []
|
||||
nonModifiableTextures: []
|
||||
preprocessorOverride: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
fileFormatVersion: 2
|
||||
guid: ea399fb043d56334aa2576c57d9a4eee
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 73 KiB |
|
|
@ -0,0 +1,138 @@
|
|||
fileFormatVersion: 2
|
||||
guid: e48b7c1f5379ceb4687833196130a9dd
|
||||
TextureImporter:
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
serializedVersion: 11
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 1
|
||||
sRGBTexture: 1
|
||||
linearTexture: 0
|
||||
fadeOut: 0
|
||||
borderMipMap: 0
|
||||
mipMapsPreserveCoverage: 0
|
||||
alphaTestReferenceValue: 0.5
|
||||
mipMapFadeDistanceStart: 1
|
||||
mipMapFadeDistanceEnd: 3
|
||||
bumpmap:
|
||||
convertToNormalMap: 0
|
||||
externalNormalMap: 0
|
||||
heightScale: 0.25
|
||||
normalMapFilter: 0
|
||||
isReadable: 0
|
||||
streamingMipmaps: 0
|
||||
streamingMipmapsPriority: 0
|
||||
vTOnly: 0
|
||||
ignoreMasterTextureLimit: 0
|
||||
grayScaleToAlpha: 0
|
||||
generateCubemap: 6
|
||||
cubemapConvolution: 0
|
||||
seamlessCubemap: 0
|
||||
textureFormat: 1
|
||||
maxTextureSize: 2048
|
||||
textureSettings:
|
||||
serializedVersion: 2
|
||||
filterMode: 1
|
||||
aniso: 1
|
||||
mipBias: 0
|
||||
wrapU: 0
|
||||
wrapV: 0
|
||||
wrapW: 0
|
||||
nPOTScale: 1
|
||||
lightmap: 0
|
||||
compressionQuality: 50
|
||||
spriteMode: 0
|
||||
spriteExtrude: 1
|
||||
spriteMeshType: 1
|
||||
alignment: 0
|
||||
spritePivot: {x: 0.5, y: 0.5}
|
||||
spritePixelsToUnits: 100
|
||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||
spriteGenerateFallbackPhysicsShape: 1
|
||||
alphaUsage: 1
|
||||
alphaIsTransparency: 0
|
||||
spriteTessellationDetail: -1
|
||||
textureType: 0
|
||||
textureShape: 2
|
||||
singleChannelComponent: 0
|
||||
flipbookRows: 1
|
||||
flipbookColumns: 1
|
||||
maxTextureSizeSet: 0
|
||||
compressionQualitySet: 0
|
||||
textureFormatSet: 0
|
||||
ignorePngGamma: 0
|
||||
applyGammaDecoding: 0
|
||||
platformSettings:
|
||||
- serializedVersion: 3
|
||||
buildTarget: DefaultTexturePlatform
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: Standalone
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: Server
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: Android
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
spriteSheet:
|
||||
serializedVersion: 2
|
||||
sprites: []
|
||||
outline: []
|
||||
physicsShape: []
|
||||
bones: []
|
||||
spriteID:
|
||||
internalID: 0
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
secondaryTextures: []
|
||||
nameFileIdTable: {}
|
||||
spritePackingTag:
|
||||
pSDRemoveMatte: 0
|
||||
pSDShowRemoveMatteOption: 0
|
||||
userData: "<?xml version=\"1.0\" encoding=\"utf-16\"?>\r\n<ExtraTextureSettings
|
||||
xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\">\r\n
|
||||
<detailMap>false</detailMap>\r\n <hemiOctNormals>true</hemiOctNormals>\r\n
|
||||
<geoRoughness>GenRoughness</geoRoughness>\r\n <geoRoughnessPow>1</geoRoughnessPow>\r\n
|
||||
<dontReadSource>false</dontReadSource>\r\n</ExtraTextureSettings>"
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
File diff suppressed because it is too large
Load diff
|
|
@ -0,0 +1,10 @@
|
|||
fileFormatVersion: 2
|
||||
guid: e95b31b7241745c479b6b9574209d1f9
|
||||
ShaderImporter:
|
||||
externalObjects: {}
|
||||
defaultTextures: []
|
||||
nonModifiableTextures: []
|
||||
preprocessorOverride: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
File diff suppressed because it is too large
Load diff
|
|
@ -0,0 +1,10 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 6bf3d81d08a4ff343b22619a187bb249
|
||||
ShaderImporter:
|
||||
externalObjects: {}
|
||||
defaultTextures: []
|
||||
nonModifiableTextures: []
|
||||
preprocessorOverride: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
fileFormatVersion: 2
|
||||
guid: ae65e6fd73412a843ad0abebcd7f7754
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 05cb88a931e735a4b9ad942dbbbf3ed7
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
fileFormatVersion: 2
|
||||
guid: baf0cae36873ec6479fc0c926f732068
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 98a02e34c0c4b8748ade0ad9cd5a2611
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
|
@ -0,0 +1,152 @@
|
|||
|
||||
#pragma target 5.0
|
||||
//#pragma multi_compile_fragment _ _VOLUMETRICS_ENABLED
|
||||
|
||||
#if defined(SHADER_API_MOBILE)
|
||||
//#!INJECT_POINT MOBILE_DEFINES
|
||||
#else
|
||||
//#!INJECT_POINT STANDALONE_DEFINES
|
||||
#endif
|
||||
|
||||
//#!INJECT_POINT UNIVERSAL_DEFINES
|
||||
|
||||
#pragma multi_compile_fog
|
||||
#pragma skip_variants FOG_LINEAR
|
||||
#pragma multi_compile_fragment _ _VOLUMETRICS_ENABLED
|
||||
#pragma multi_compile_instancing
|
||||
#pragma instancing_options procedural:ParticleInstancingSetup
|
||||
|
||||
|
||||
|
||||
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Color.hlsl"
|
||||
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Texture.hlsl"
|
||||
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl"
|
||||
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl"
|
||||
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl"
|
||||
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Shadows.hlsl"
|
||||
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/ShaderGraphFunctions.hlsl"
|
||||
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/DBuffer.hlsl"
|
||||
#include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/ShaderPass.hlsl"
|
||||
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Packing.hlsl"
|
||||
#include "Include/Particle/billboard.hlsl"
|
||||
//#!INJECT_POINT INCLUDES
|
||||
|
||||
struct appdata
|
||||
{
|
||||
float4 vertex : POSITION;
|
||||
float4 uv0_vertexStream0_xy : TEXCOORD0;
|
||||
half4 color : COLOR;
|
||||
//#!INJECT_POINT VERTEX_IN
|
||||
//#!INJECT_DEFAULT
|
||||
float vertexStream1 : TEXCOORD1;
|
||||
//#!INJECT_END
|
||||
UNITY_VERTEX_INPUT_INSTANCE_ID
|
||||
};
|
||||
|
||||
struct v2f
|
||||
{
|
||||
//#!INJECT_POINT VERTEX_CENTROID
|
||||
//#!INJECT_DEFAULT
|
||||
float4 vertex : SV_POSITION;
|
||||
//#!INJECT_END
|
||||
float2 uv0 : TEXCOORD0;
|
||||
float4 wPos_xyz_fog_x : TEXCOORD1;
|
||||
half4 color : COLOR;
|
||||
//#!INJECT_POINT INTERPOLATORS
|
||||
|
||||
UNITY_VERTEX_INPUT_INSTANCE_ID
|
||||
UNITY_VERTEX_OUTPUT_STEREO
|
||||
};
|
||||
|
||||
struct fragOut
|
||||
{
|
||||
half4 color : SV_Target;
|
||||
//#!INJECT_POINT OUTPUT_SEMANTICS
|
||||
};
|
||||
|
||||
//#include "Include/PlatformSamplers.hlsl"
|
||||
|
||||
TEXTURE2D(_BaseMap);
|
||||
SamplerState sampler_BaseMap;
|
||||
|
||||
//#!INJECT_POINT UNIFORMS
|
||||
|
||||
CBUFFER_START(UnityPerMaterial)
|
||||
float4 _BaseMap_ST;
|
||||
half4 _BaseColor;
|
||||
//#!INJECT_POINT MATERIAL_CBUFFER
|
||||
CBUFFER_END
|
||||
|
||||
//#!INJECT_POINT FUNCTIONS
|
||||
|
||||
v2f vert(appdata v)
|
||||
{
|
||||
v2f o;
|
||||
UNITY_SETUP_INSTANCE_ID(v);
|
||||
UNITY_TRANSFER_INSTANCE_ID(v, o);
|
||||
UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o);
|
||||
|
||||
//#!INJECT_POINT VERT_BEGIN
|
||||
|
||||
//#!INJECT_POINT VERT_TRANSFORM
|
||||
//#!INJECT_DEFAULT
|
||||
float3 particleCenter = float3(v.uv0_vertexStream0_xy.zw, v.vertexStream1.x);
|
||||
v.vertex.xyz = ParticleFaceCamera(v.vertex.xyz, particleCenter);
|
||||
//#!INJECT_END
|
||||
o.wPos_xyz_fog_x.xyz = TransformObjectToWorld(v.vertex.xyz);
|
||||
o.vertex = TransformWorldToHClip(o.wPos_xyz_fog_x.xyz);
|
||||
o.uv0 = TRANSFORM_TEX(v.uv0_vertexStream0_xy.xy, _BaseMap);
|
||||
half clipZ_0Far = UNITY_Z_0_FAR_FROM_CLIPSPACE(o.vertex.z);
|
||||
o.wPos_xyz_fog_x.w = unity_FogParams.x * clipZ_0Far;
|
||||
o.color = v.color;
|
||||
|
||||
//#!INJECT_POINT VERT_END
|
||||
|
||||
return o;
|
||||
}
|
||||
|
||||
fragOut frag(v2f i)
|
||||
{
|
||||
UNITY_SETUP_INSTANCE_ID(i);
|
||||
UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(i);
|
||||
|
||||
fragOut f;
|
||||
|
||||
//#!INJECT_POINT FRAG_BEGIN
|
||||
|
||||
//#!INJECT_POINT FRAG_COLOR
|
||||
//#!INJECT_DEFAULT
|
||||
f.color = SAMPLE_TEXTURE2D(_BaseMap, sampler_BaseMap, i.uv0);
|
||||
f.color *= _BaseColor * i.color;
|
||||
//#!INJECT_END
|
||||
|
||||
//#!INJECT_POINT FRAG_FOG
|
||||
//#!INJECT_DEFAULT
|
||||
half3 viewDir = normalize(half3(i.wPos_xyz_fog_x.xyz - _WorldSpaceCameraPos));
|
||||
#if defined(FOG_LINEAR) || defined(FOG_EXP) || defined(FOG_EXP2)
|
||||
#if defined(SLZ_PARTICLE_ADDITIVE)
|
||||
f.color.rgb *= 1.0 - ComputeFogIntensity(i.wPos_xyz_fog_x.w);
|
||||
#elif defined(SLZ_PARTICLE_MULTIPLICATIVE)
|
||||
f.color.rgb = lerp(f.color.rgb, half3(1,1,1), ComputeFogIntensity(i.wPos_xyz_fog_x.w));
|
||||
#elif defined(SLZ_PARTICLE_ALPHABLEND)
|
||||
f.color.rgb = MixFog(f.color.rgb, viewDir, i.wPos_xyz_fog_x.w);
|
||||
#endif
|
||||
#endif
|
||||
//#!INJECT_END
|
||||
|
||||
|
||||
//#!INJECT_POINT FRAG_VOLUMETRICS
|
||||
//#!INJECT_DEFAULT
|
||||
#if defined(SLZ_PARTICLE_ADDITIVE)
|
||||
#if defined(_VOLUMETRICS_ENABLED)
|
||||
f.color *= GetVolumetricColor(i.wPos_xyz_fog_x.xyz).a;
|
||||
#endif
|
||||
#elif defined(SLZ_PARTICLE_ALPHABLEND)
|
||||
f.color = Volumetrics(f.color, i.wPos_xyz_fog_x.xyz);
|
||||
#endif
|
||||
//#!INJECT_END
|
||||
|
||||
//#!INJECT_POINT FRAG_END
|
||||
|
||||
return f;
|
||||
}
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 2df13d630bf74324fbefa9003b6544b3
|
||||
ShaderIncludeImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 4e0ec44885694984b843804e07b56a1c
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
|
@ -0,0 +1,42 @@
|
|||
//#!INJECT_BEGIN INCLUDES 0
|
||||
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/SLZBlueNoise.hlsl"
|
||||
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/DeclareDepthTexture.hlsl"
|
||||
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/SLZSoftBlend.hlsl"
|
||||
//#!INJECT_END
|
||||
|
||||
//#!INJECT_BEGIN MATERIAL_CBUFFER 0
|
||||
float _SoftFactor;
|
||||
//#!INJECT_END
|
||||
|
||||
//#!INJECT_BEGIN VERTEX_CENTROID 0
|
||||
#if defined(SHADER_API_MOBILE)
|
||||
centroid float4 vertex : SV_POSITION;
|
||||
#else
|
||||
float4 vertex : SV_POSITION;
|
||||
#endif
|
||||
//#!INJECT_END
|
||||
|
||||
//#!INJECT_BEGIN OUTPUT_SEMANTICS 0
|
||||
#if defined(SHADER_API_MOBILE)
|
||||
float depth : SV_DepthLessEqual;
|
||||
#endif
|
||||
//#!INJECT_END
|
||||
|
||||
|
||||
//#!INJECT_BEGIN FRAG_END 99
|
||||
#if defined(SHADER_API_MOBILE)
|
||||
half noise = GetScreenNoiseR(screenUVs);
|
||||
f.depth = SLZSoftBlendZTest(i.vertex.z, noise, _SoftFactor);
|
||||
#else
|
||||
float rawDepth = SampleSceneDepth(screenUVs);
|
||||
float viewZ = dot(GetWorldToViewMatrix()._m20_m21_m22_m23, float4(i.wPos_xyz_fog_x.xyz, 1));
|
||||
float fade = SLZSoftBlendDepth(rawDepth, viewZ, _SoftFactor);
|
||||
#if defined(SLZ_PARTICLE_ADDITIVE)
|
||||
f.color *= fade;
|
||||
#elif defined(SLZ_PARTICLE_MULTIPLICATIVE)
|
||||
f.color = lerp(fade, float4(1,1,1,1), f.color));
|
||||
#else
|
||||
f.color.a *= fade;
|
||||
#endif
|
||||
#endif
|
||||
//#!INJECT_END
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
fileFormatVersion: 2
|
||||
guid: f42ab72a6a8465649be290d03a8f1981
|
||||
ShaderIncludeImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
|
||||
//#!INJECT_BEGIN FRAG_BEGIN -1
|
||||
float2 screenUVs = GetNormalizedScreenSpaceUV(i.vertex);
|
||||
//#!INJECT_END
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 03859193eb793184ca8cc47738d7109d
|
||||
ShaderIncludeImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
|
@ -0,0 +1,39 @@
|
|||
//#!INJECT_BEGIN UNIFORMS 0
|
||||
TEXTURE2D(_ScreenSpacePattern);
|
||||
SAMPLER(sampler_ScreenSpacePattern);
|
||||
//#!INJECT_END
|
||||
|
||||
//#!INJECT_BEGIN MATERIAL_CBUFFER 0
|
||||
half _Speed;
|
||||
half _SecondarySpeed;
|
||||
float _ScreenSpaceSize;
|
||||
float _ParticleOffset;
|
||||
//#!INJECT_END
|
||||
|
||||
//#!INJECT_BEGIN FUNCTIONS 0
|
||||
float2 RotateTorchUVs(float2 uv, float2 center, float angle)
|
||||
{
|
||||
uv = uv - center;
|
||||
float sin1, cos1;
|
||||
sincos(angle, sin1, cos1);
|
||||
float2x2 rotMat = float2x2(cos1, -sin1, sin1, cos1);
|
||||
uv = mul(rotMat, uv);
|
||||
return uv + center;
|
||||
}
|
||||
//#!INJECT_END
|
||||
|
||||
//#!INJECT_BEGIN VERT_BEGIN 0
|
||||
v.vertex.z += _ParticleOffset;
|
||||
//#!INJECT_END
|
||||
|
||||
//#!INJECT_BEGIN FRAG_COLOR 0
|
||||
float angle1 = frac(_Time[0] * 3.1830988618 * _Speed) * TWO_PI;
|
||||
float angle2 = frac(_Time[0] * 3.1830988618 * _Speed * _SecondarySpeed) * TWO_PI;
|
||||
angle1 = -angle1;
|
||||
float2 uv1 = RotateTorchUVs(i.uv0.xy, float2(0.5, 0.5), angle1);
|
||||
half layer1 = SAMPLE_TEXTURE2D(_BaseMap, sampler_BaseMap, uv1).r;
|
||||
float2 uv2 = RotateTorchUVs(i.uv0.xy, float2(0.5, 0.5), angle2);
|
||||
half layer2 = SAMPLE_TEXTURE2D(_BaseMap, sampler_BaseMap, uv2).r;
|
||||
half4 SSPattern = SAMPLE_TEXTURE2D(_ScreenSpacePattern, sampler_ScreenSpacePattern, _ScreenParams.xy * screenUVs / _ScreenSpaceSize);
|
||||
f.color = (layer1 * layer2 * i.color.a) * SSPattern * _BaseColor * i.color;
|
||||
//#!INJECT_END
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 2a6fc1acbba5a6045a0692bfb9a7a8f2
|
||||
ShaderIncludeImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &11400000
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: bd7d1f8f9838c1541abbb5c264b254f6, type: 3}
|
||||
m_Name: ParticleBasic
|
||||
m_EditorClassIdentifier:
|
||||
outputInclude: {fileID: 10900000, guid: c156fe6f1c50d864f8ceb85b935236f7, type: 3}
|
||||
baseInclude: {fileID: 10900000, guid: 2df13d630bf74324fbefa9003b6544b3, type: 3}
|
||||
injectableIncludes: []
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 36686d6671a56b04f9401216e0ff9ae5
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
|
@ -0,0 +1,128 @@
|
|||
/*-----------------------------------------------------------------------------------------------------*
|
||||
*-----------------------------------------------------------------------------------------------------*
|
||||
* WARNING: THIS FILE WAS CREATED WITH SHADERINJECTOR, AND SHOULD NOT BE EDITED DIRECTLY. MODIFY THE *
|
||||
* BASE INCLUDE AND INJECTED FILES INSTEAD, AND REGENERATE!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! *
|
||||
*-----------------------------------------------------------------------------------------------------*
|
||||
*-----------------------------------------------------------------------------------------------------*/
|
||||
|
||||
|
||||
#pragma target 5.0
|
||||
//#pragma multi_compile_fragment _ _VOLUMETRICS_ENABLED
|
||||
|
||||
#if defined(SHADER_API_MOBILE)
|
||||
#else
|
||||
#endif
|
||||
|
||||
|
||||
#pragma multi_compile_fog
|
||||
#pragma skip_variants FOG_LINEAR
|
||||
#pragma multi_compile_fragment _ _VOLUMETRICS_ENABLED
|
||||
#pragma multi_compile_instancing
|
||||
#pragma instancing_options procedural:ParticleInstancingSetup
|
||||
|
||||
|
||||
|
||||
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Color.hlsl"
|
||||
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Texture.hlsl"
|
||||
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl"
|
||||
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl"
|
||||
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl"
|
||||
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Shadows.hlsl"
|
||||
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/ShaderGraphFunctions.hlsl"
|
||||
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/DBuffer.hlsl"
|
||||
#include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/ShaderPass.hlsl"
|
||||
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Packing.hlsl"
|
||||
#include "Include/Particle/billboard.hlsl"
|
||||
|
||||
struct appdata
|
||||
{
|
||||
float4 vertex : POSITION;
|
||||
float4 uv0_vertexStream0_xy : TEXCOORD0;
|
||||
half4 color : COLOR;
|
||||
float vertexStream1 : TEXCOORD1;
|
||||
UNITY_VERTEX_INPUT_INSTANCE_ID
|
||||
};
|
||||
|
||||
struct v2f
|
||||
{
|
||||
float4 vertex : SV_POSITION;
|
||||
float2 uv0 : TEXCOORD0;
|
||||
float4 wPos_xyz_fog_x : TEXCOORD1;
|
||||
half4 color : COLOR;
|
||||
|
||||
UNITY_VERTEX_INPUT_INSTANCE_ID
|
||||
UNITY_VERTEX_OUTPUT_STEREO
|
||||
};
|
||||
|
||||
struct fragOut
|
||||
{
|
||||
half4 color : SV_Target;
|
||||
};
|
||||
|
||||
//#include "Include/PlatformSamplers.hlsl"
|
||||
|
||||
TEXTURE2D(_BaseMap);
|
||||
SamplerState sampler_BaseMap;
|
||||
|
||||
|
||||
CBUFFER_START(UnityPerMaterial)
|
||||
float4 _BaseMap_ST;
|
||||
half4 _BaseColor;
|
||||
CBUFFER_END
|
||||
|
||||
|
||||
v2f vert(appdata v)
|
||||
{
|
||||
v2f o;
|
||||
UNITY_SETUP_INSTANCE_ID(v);
|
||||
UNITY_TRANSFER_INSTANCE_ID(v, o);
|
||||
UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o);
|
||||
|
||||
|
||||
float3 particleCenter = float3(v.uv0_vertexStream0_xy.zw, v.vertexStream1.x);
|
||||
v.vertex.xyz = ParticleFaceCamera(v.vertex.xyz, particleCenter);
|
||||
o.wPos_xyz_fog_x.xyz = TransformObjectToWorld(v.vertex.xyz);
|
||||
o.vertex = TransformWorldToHClip(o.wPos_xyz_fog_x.xyz);
|
||||
o.uv0 = TRANSFORM_TEX(v.uv0_vertexStream0_xy.xy, _BaseMap);
|
||||
half clipZ_0Far = UNITY_Z_0_FAR_FROM_CLIPSPACE(o.vertex.z);
|
||||
o.wPos_xyz_fog_x.w = unity_FogParams.x * clipZ_0Far;
|
||||
o.color = v.color;
|
||||
|
||||
|
||||
return o;
|
||||
}
|
||||
|
||||
fragOut frag(v2f i)
|
||||
{
|
||||
UNITY_SETUP_INSTANCE_ID(i);
|
||||
UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(i);
|
||||
|
||||
fragOut f;
|
||||
|
||||
|
||||
f.color = SAMPLE_TEXTURE2D(_BaseMap, sampler_BaseMap, i.uv0);
|
||||
f.color *= _BaseColor * i.color;
|
||||
|
||||
half3 viewDir = normalize(half3(i.wPos_xyz_fog_x.xyz - _WorldSpaceCameraPos));
|
||||
#if defined(FOG_LINEAR) || defined(FOG_EXP) || defined(FOG_EXP2)
|
||||
#if defined(SLZ_PARTICLE_ADDITIVE)
|
||||
f.color.rgb *= 1.0 - ComputeFogIntensity(i.wPos_xyz_fog_x.w);
|
||||
#elif defined(SLZ_PARTICLE_MULTIPLICATIVE)
|
||||
f.color.rgb = lerp(f.color.rgb, half3(1,1,1), ComputeFogIntensity(i.wPos_xyz_fog_x.w));
|
||||
#elif defined(SLZ_PARTICLE_ALPHABLEND)
|
||||
f.color.rgb = MixFog(f.color.rgb, viewDir, i.wPos_xyz_fog_x.w);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
#if defined(SLZ_PARTICLE_ADDITIVE)
|
||||
#if defined(_VOLUMETRICS_ENABLED)
|
||||
f.color *= GetVolumetricColor(i.wPos_xyz_fog_x.xyz).a;
|
||||
#endif
|
||||
#elif defined(SLZ_PARTICLE_ALPHABLEND)
|
||||
f.color = Volumetrics(f.color, i.wPos_xyz_fog_x.xyz);
|
||||
#endif
|
||||
|
||||
|
||||
return f;
|
||||
}
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
fileFormatVersion: 2
|
||||
guid: c156fe6f1c50d864f8ceb85b935236f7
|
||||
ShaderIncludeImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &11400000
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: bd7d1f8f9838c1541abbb5c264b254f6, type: 3}
|
||||
m_Name: ParticleSoft
|
||||
m_EditorClassIdentifier:
|
||||
outputInclude: {fileID: 10900000, guid: 005850956c06e3c4d9126500376c9a40, type: 3}
|
||||
baseInclude: {fileID: 10900000, guid: 2df13d630bf74324fbefa9003b6544b3, type: 3}
|
||||
injectableIncludes:
|
||||
- {fileID: 10900000, guid: 03859193eb793184ca8cc47738d7109d, type: 3}
|
||||
- {fileID: 10900000, guid: f42ab72a6a8465649be290d03a8f1981, type: 3}
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 390d76c4ec3c32e4e8ecc2b49aa78a1c
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
|
@ -0,0 +1,175 @@
|
|||
/*-----------------------------------------------------------------------------------------------------*
|
||||
*-----------------------------------------------------------------------------------------------------*
|
||||
* WARNING: THIS FILE WAS CREATED WITH SHADERINJECTOR, AND SHOULD NOT BE EDITED DIRECTLY. MODIFY THE *
|
||||
* BASE INCLUDE AND INJECTED FILES INSTEAD, AND REGENERATE!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! *
|
||||
*-----------------------------------------------------------------------------------------------------*
|
||||
*-----------------------------------------------------------------------------------------------------*/
|
||||
|
||||
|
||||
#pragma target 5.0
|
||||
//#pragma multi_compile_fragment _ _VOLUMETRICS_ENABLED
|
||||
|
||||
#if defined(SHADER_API_MOBILE)
|
||||
#else
|
||||
#endif
|
||||
|
||||
|
||||
#pragma multi_compile_fog
|
||||
#pragma skip_variants FOG_LINEAR
|
||||
#pragma multi_compile_fragment _ _VOLUMETRICS_ENABLED
|
||||
#pragma multi_compile_instancing
|
||||
#pragma instancing_options procedural:ParticleInstancingSetup
|
||||
|
||||
|
||||
|
||||
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Color.hlsl"
|
||||
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Texture.hlsl"
|
||||
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl"
|
||||
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl"
|
||||
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl"
|
||||
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Shadows.hlsl"
|
||||
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/ShaderGraphFunctions.hlsl"
|
||||
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/DBuffer.hlsl"
|
||||
#include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/ShaderPass.hlsl"
|
||||
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Packing.hlsl"
|
||||
#include "Include/Particle/billboard.hlsl"
|
||||
// Begin Injection INCLUDES from Injection_Particle_SoftBlend.hlsl ----------------------------------------------------------
|
||||
#if defined(SHADER_API_MOBILE)
|
||||
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/SLZBlueNoise.hlsl"
|
||||
#else
|
||||
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/DeclareDepthTexture.hlsl"
|
||||
#endif
|
||||
// End Injection INCLUDES from Injection_Particle_SoftBlend.hlsl ----------------------------------------------------------
|
||||
|
||||
struct appdata
|
||||
{
|
||||
float4 vertex : POSITION;
|
||||
float4 uv0_vertexStream0_xy : TEXCOORD0;
|
||||
half4 color : COLOR;
|
||||
float vertexStream1 : TEXCOORD1;
|
||||
UNITY_VERTEX_INPUT_INSTANCE_ID
|
||||
};
|
||||
|
||||
struct v2f
|
||||
{
|
||||
// Begin Injection VERTEX_CENTROID from Injection_Particle_SoftBlend.hlsl ----------------------------------------------------------
|
||||
#if defined(SHADER_API_MOBILE)
|
||||
centroid float4 vertex : SV_POSITION;
|
||||
#else
|
||||
float4 vertex : SV_POSITION;
|
||||
#endif
|
||||
// End Injection VERTEX_CENTROID from Injection_Particle_SoftBlend.hlsl ----------------------------------------------------------
|
||||
float2 uv0 : TEXCOORD0;
|
||||
float4 wPos_xyz_fog_x : TEXCOORD1;
|
||||
half4 color : COLOR;
|
||||
|
||||
UNITY_VERTEX_INPUT_INSTANCE_ID
|
||||
UNITY_VERTEX_OUTPUT_STEREO
|
||||
};
|
||||
|
||||
struct fragOut
|
||||
{
|
||||
half4 color : SV_Target;
|
||||
// Begin Injection OUTPUT_SEMANTICS from Injection_Particle_SoftBlend.hlsl ----------------------------------------------------------
|
||||
#if defined(SHADER_API_MOBILE)
|
||||
float depth : SV_DepthLessEqual;
|
||||
#endif
|
||||
// End Injection OUTPUT_SEMANTICS from Injection_Particle_SoftBlend.hlsl ----------------------------------------------------------
|
||||
};
|
||||
|
||||
//#include "Include/PlatformSamplers.hlsl"
|
||||
|
||||
TEXTURE2D(_BaseMap);
|
||||
SamplerState sampler_BaseMap;
|
||||
|
||||
|
||||
CBUFFER_START(UnityPerMaterial)
|
||||
float4 _BaseMap_ST;
|
||||
half4 _BaseColor;
|
||||
// Begin Injection MATERIAL_CBUFFER from Injection_Particle_SoftBlend.hlsl ----------------------------------------------------------
|
||||
float _SoftFactor;
|
||||
// End Injection MATERIAL_CBUFFER from Injection_Particle_SoftBlend.hlsl ----------------------------------------------------------
|
||||
CBUFFER_END
|
||||
|
||||
|
||||
v2f vert(appdata v)
|
||||
{
|
||||
v2f o;
|
||||
UNITY_SETUP_INSTANCE_ID(v);
|
||||
UNITY_TRANSFER_INSTANCE_ID(v, o);
|
||||
UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o);
|
||||
|
||||
|
||||
float3 particleCenter = float3(v.uv0_vertexStream0_xy.zw, v.vertexStream1.x);
|
||||
v.vertex.xyz = ParticleFaceCamera(v.vertex.xyz, particleCenter);
|
||||
o.wPos_xyz_fog_x.xyz = TransformObjectToWorld(v.vertex.xyz);
|
||||
o.vertex = TransformWorldToHClip(o.wPos_xyz_fog_x.xyz);
|
||||
o.uv0 = TRANSFORM_TEX(v.uv0_vertexStream0_xy.xy, _BaseMap);
|
||||
half clipZ_0Far = UNITY_Z_0_FAR_FROM_CLIPSPACE(o.vertex.z);
|
||||
o.wPos_xyz_fog_x.w = unity_FogParams.x * clipZ_0Far;
|
||||
o.color = v.color;
|
||||
|
||||
|
||||
return o;
|
||||
}
|
||||
|
||||
fragOut frag(v2f i)
|
||||
{
|
||||
UNITY_SETUP_INSTANCE_ID(i);
|
||||
UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(i);
|
||||
|
||||
fragOut f;
|
||||
|
||||
// Begin Injection FRAG_BEGIN from Injection_Particle_screenspaceUVs.hlsl ----------------------------------------------------------
|
||||
float2 screenUVs = GetNormalizedScreenSpaceUV(i.vertex);
|
||||
// End Injection FRAG_BEGIN from Injection_Particle_screenspaceUVs.hlsl ----------------------------------------------------------
|
||||
|
||||
f.color = SAMPLE_TEXTURE2D(_BaseMap, sampler_BaseMap, i.uv0);
|
||||
f.color *= _BaseColor * i.color;
|
||||
|
||||
half3 viewDir = normalize(half3(i.wPos_xyz_fog_x.xyz - _WorldSpaceCameraPos));
|
||||
#if defined(FOG_LINEAR) || defined(FOG_EXP) || defined(FOG_EXP2)
|
||||
#if defined(SLZ_PARTICLE_ADDITIVE)
|
||||
f.color.rgb *= 1.0 - ComputeFogIntensity(i.wPos_xyz_fog_x.w);
|
||||
#elif defined(SLZ_PARTICLE_MULTIPLICATIVE)
|
||||
f.color.rgb = lerp(f.color.rgb, half3(1,1,1), ComputeFogIntensity(i.wPos_xyz_fog_x.w));
|
||||
#elif defined(SLZ_PARTICLE_ALPHABLEND)
|
||||
f.color.rgb = MixFog(f.color.rgb, viewDir, i.wPos_xyz_fog_x.w);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
#if defined(SLZ_PARTICLE_ADDITIVE)
|
||||
#if defined(_VOLUMETRICS_ENABLED)
|
||||
f.color *= GetVolumetricColor(i.wPos_xyz_fog_x.xyz).a;
|
||||
#endif
|
||||
#elif defined(SLZ_PARTICLE_ALPHABLEND)
|
||||
f.color = Volumetrics(f.color, i.wPos_xyz_fog_x.xyz);
|
||||
#endif
|
||||
|
||||
// Begin Injection FRAG_END from Injection_Particle_SoftBlend.hlsl ----------------------------------------------------------
|
||||
#if defined(SHADER_API_MOBILE)
|
||||
half noise = GetScreenNoiseR(screenUVs);
|
||||
float depthOffset = _SoftFactor * noise * noise ;
|
||||
float vertDepth = i.vertex.z;
|
||||
float cameraZ = 1.0 / (_ZBufferParams.z * vertDepth + _ZBufferParams.w);
|
||||
cameraZ += depthOffset;
|
||||
f.depth = (rcp(cameraZ) - _ZBufferParams.w) / _ZBufferParams.z;
|
||||
#else
|
||||
float rawDepth = SampleSceneDepth(screenUVs);
|
||||
float sceneZ = (unity_OrthoParams.w == 0) ? LinearEyeDepth(rawDepth, _ZBufferParams) : LinearDepthToEyeDepth(rawDepth);
|
||||
float thisZ = LinearEyeDepth(i.wPos_xyz_fog_x.xyz, GetWorldToViewMatrix());
|
||||
float fade = saturate((1 / _SoftFactor) * (sceneZ - thisZ));
|
||||
fade *= fade;
|
||||
#if defined(SLZ_PARTICLE_ADDITIVE)
|
||||
f.color *= fade;
|
||||
#elif defined(SLZ_PARTICLE_MULTIPLICATIVE)
|
||||
f.color = lerp(fade, float4(1,1,1,1), f.color));
|
||||
#else
|
||||
f.color.a *= fade;
|
||||
#endif
|
||||
#endif
|
||||
// End Injection FRAG_END from Injection_Particle_SoftBlend.hlsl ----------------------------------------------------------
|
||||
|
||||
return f;
|
||||
}
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 005850956c06e3c4d9126500376c9a40
|
||||
ShaderIncludeImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
|
@ -0,0 +1,20 @@
|
|||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &11400000
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: bd7d1f8f9838c1541abbb5c264b254f6, type: 3}
|
||||
m_Name: ParticleTorch
|
||||
m_EditorClassIdentifier:
|
||||
outputInclude: {fileID: 10900000, guid: 2313d59684d119840a78fee73c48959a, type: 3}
|
||||
baseInclude: {fileID: 10900000, guid: 2df13d630bf74324fbefa9003b6544b3, type: 3}
|
||||
injectableIncludes:
|
||||
- {fileID: 10900000, guid: 03859193eb793184ca8cc47738d7109d, type: 3}
|
||||
- {fileID: 10900000, guid: f42ab72a6a8465649be290d03a8f1981, type: 3}
|
||||
- {fileID: 10900000, guid: 2a6fc1acbba5a6045a0692bfb9a7a8f2, type: 3}
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 88f1b8e9d502e19419d88bca2cab94da
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
|
@ -0,0 +1,200 @@
|
|||
/*-----------------------------------------------------------------------------------------------------*
|
||||
*-----------------------------------------------------------------------------------------------------*
|
||||
* WARNING: THIS FILE WAS CREATED WITH SHADERINJECTOR, AND SHOULD NOT BE EDITED DIRECTLY. MODIFY THE *
|
||||
* BASE INCLUDE AND INJECTED FILES INSTEAD, AND REGENERATE!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! *
|
||||
*-----------------------------------------------------------------------------------------------------*
|
||||
*-----------------------------------------------------------------------------------------------------*/
|
||||
|
||||
|
||||
#pragma target 5.0
|
||||
//#pragma multi_compile_fragment _ _VOLUMETRICS_ENABLED
|
||||
|
||||
#if defined(SHADER_API_MOBILE)
|
||||
#else
|
||||
#endif
|
||||
|
||||
|
||||
#pragma multi_compile_fog
|
||||
#pragma skip_variants FOG_LINEAR
|
||||
#pragma multi_compile_fragment _ _VOLUMETRICS_ENABLED
|
||||
#pragma multi_compile_instancing
|
||||
#pragma instancing_options procedural:ParticleInstancingSetup
|
||||
|
||||
|
||||
|
||||
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Color.hlsl"
|
||||
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Texture.hlsl"
|
||||
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl"
|
||||
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl"
|
||||
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl"
|
||||
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Shadows.hlsl"
|
||||
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/ShaderGraphFunctions.hlsl"
|
||||
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/DBuffer.hlsl"
|
||||
#include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/ShaderPass.hlsl"
|
||||
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Packing.hlsl"
|
||||
#include "Include/Particle/billboard.hlsl"
|
||||
// Begin Injection INCLUDES from Injection_Particle_SoftBlend.hlsl ----------------------------------------------------------
|
||||
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/SLZBlueNoise.hlsl"
|
||||
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/DeclareDepthTexture.hlsl"
|
||||
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/SLZSoftBlend.hlsl"
|
||||
// End Injection INCLUDES from Injection_Particle_SoftBlend.hlsl ----------------------------------------------------------
|
||||
|
||||
struct appdata
|
||||
{
|
||||
float4 vertex : POSITION;
|
||||
float4 uv0_vertexStream0_xy : TEXCOORD0;
|
||||
half4 color : COLOR;
|
||||
float vertexStream1 : TEXCOORD1;
|
||||
UNITY_VERTEX_INPUT_INSTANCE_ID
|
||||
};
|
||||
|
||||
struct v2f
|
||||
{
|
||||
// Begin Injection VERTEX_CENTROID from Injection_Particle_SoftBlend.hlsl ----------------------------------------------------------
|
||||
#if defined(SHADER_API_MOBILE)
|
||||
centroid float4 vertex : SV_POSITION;
|
||||
#else
|
||||
float4 vertex : SV_POSITION;
|
||||
#endif
|
||||
// End Injection VERTEX_CENTROID from Injection_Particle_SoftBlend.hlsl ----------------------------------------------------------
|
||||
float2 uv0 : TEXCOORD0;
|
||||
float4 wPos_xyz_fog_x : TEXCOORD1;
|
||||
half4 color : COLOR;
|
||||
|
||||
UNITY_VERTEX_INPUT_INSTANCE_ID
|
||||
UNITY_VERTEX_OUTPUT_STEREO
|
||||
};
|
||||
|
||||
struct fragOut
|
||||
{
|
||||
half4 color : SV_Target;
|
||||
// Begin Injection OUTPUT_SEMANTICS from Injection_Particle_SoftBlend.hlsl ----------------------------------------------------------
|
||||
#if defined(SHADER_API_MOBILE)
|
||||
float depth : SV_DepthLessEqual;
|
||||
#endif
|
||||
// End Injection OUTPUT_SEMANTICS from Injection_Particle_SoftBlend.hlsl ----------------------------------------------------------
|
||||
};
|
||||
|
||||
//#include "Include/PlatformSamplers.hlsl"
|
||||
|
||||
TEXTURE2D(_BaseMap);
|
||||
SamplerState sampler_BaseMap;
|
||||
|
||||
// Begin Injection UNIFORMS from Injection_Torch.hlsl ----------------------------------------------------------
|
||||
TEXTURE2D(_ScreenSpacePattern);
|
||||
SAMPLER(sampler_ScreenSpacePattern);
|
||||
// End Injection UNIFORMS from Injection_Torch.hlsl ----------------------------------------------------------
|
||||
|
||||
CBUFFER_START(UnityPerMaterial)
|
||||
float4 _BaseMap_ST;
|
||||
half4 _BaseColor;
|
||||
// Begin Injection MATERIAL_CBUFFER from Injection_Particle_SoftBlend.hlsl ----------------------------------------------------------
|
||||
float _SoftFactor;
|
||||
// End Injection MATERIAL_CBUFFER from Injection_Particle_SoftBlend.hlsl ----------------------------------------------------------
|
||||
// Begin Injection MATERIAL_CBUFFER from Injection_Torch.hlsl ----------------------------------------------------------
|
||||
half _Speed;
|
||||
half _SecondarySpeed;
|
||||
float _ScreenSpaceSize;
|
||||
float _ParticleOffset;
|
||||
// End Injection MATERIAL_CBUFFER from Injection_Torch.hlsl ----------------------------------------------------------
|
||||
CBUFFER_END
|
||||
|
||||
// Begin Injection FUNCTIONS from Injection_Torch.hlsl ----------------------------------------------------------
|
||||
float2 RotateTorchUVs(float2 uv, float2 center, float angle)
|
||||
{
|
||||
uv = uv - center;
|
||||
float sin1, cos1;
|
||||
sincos(angle, sin1, cos1);
|
||||
float2x2 rotMat = float2x2(cos1, -sin1, sin1, cos1);
|
||||
uv = mul(rotMat, uv);
|
||||
return uv + center;
|
||||
}
|
||||
// End Injection FUNCTIONS from Injection_Torch.hlsl ----------------------------------------------------------
|
||||
|
||||
v2f vert(appdata v)
|
||||
{
|
||||
v2f o;
|
||||
UNITY_SETUP_INSTANCE_ID(v);
|
||||
UNITY_TRANSFER_INSTANCE_ID(v, o);
|
||||
UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o);
|
||||
|
||||
// Begin Injection VERT_BEGIN from Injection_Torch.hlsl ----------------------------------------------------------
|
||||
v.vertex.z += _ParticleOffset;
|
||||
// End Injection VERT_BEGIN from Injection_Torch.hlsl ----------------------------------------------------------
|
||||
|
||||
float3 particleCenter = float3(v.uv0_vertexStream0_xy.zw, v.vertexStream1.x);
|
||||
v.vertex.xyz = ParticleFaceCamera(v.vertex.xyz, particleCenter);
|
||||
o.wPos_xyz_fog_x.xyz = TransformObjectToWorld(v.vertex.xyz);
|
||||
o.vertex = TransformWorldToHClip(o.wPos_xyz_fog_x.xyz);
|
||||
o.uv0 = TRANSFORM_TEX(v.uv0_vertexStream0_xy.xy, _BaseMap);
|
||||
half clipZ_0Far = UNITY_Z_0_FAR_FROM_CLIPSPACE(o.vertex.z);
|
||||
o.wPos_xyz_fog_x.w = unity_FogParams.x * clipZ_0Far;
|
||||
o.color = v.color;
|
||||
|
||||
|
||||
return o;
|
||||
}
|
||||
|
||||
fragOut frag(v2f i)
|
||||
{
|
||||
UNITY_SETUP_INSTANCE_ID(i);
|
||||
UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(i);
|
||||
|
||||
fragOut f;
|
||||
|
||||
// Begin Injection FRAG_BEGIN from Injection_Particle_screenspaceUVs.hlsl ----------------------------------------------------------
|
||||
float2 screenUVs = GetNormalizedScreenSpaceUV(i.vertex);
|
||||
// End Injection FRAG_BEGIN from Injection_Particle_screenspaceUVs.hlsl ----------------------------------------------------------
|
||||
|
||||
// Begin Injection FRAG_COLOR from Injection_Torch.hlsl ----------------------------------------------------------
|
||||
float angle1 = frac(_Time[0] * 3.1830988618 * _Speed) * TWO_PI;
|
||||
float angle2 = frac(_Time[0] * 3.1830988618 * _Speed * _SecondarySpeed) * TWO_PI;
|
||||
angle1 = -angle1;
|
||||
float2 uv1 = RotateTorchUVs(i.uv0.xy, float2(0.5, 0.5), angle1);
|
||||
half layer1 = SAMPLE_TEXTURE2D(_BaseMap, sampler_BaseMap, uv1).r;
|
||||
float2 uv2 = RotateTorchUVs(i.uv0.xy, float2(0.5, 0.5), angle2);
|
||||
half layer2 = SAMPLE_TEXTURE2D(_BaseMap, sampler_BaseMap, uv2).r;
|
||||
half4 SSPattern = SAMPLE_TEXTURE2D(_ScreenSpacePattern, sampler_ScreenSpacePattern, _ScreenParams.xy * screenUVs / _ScreenSpaceSize);
|
||||
f.color = (layer1 * layer2 * i.color.a) * SSPattern * _BaseColor * i.color;
|
||||
// End Injection FRAG_COLOR from Injection_Torch.hlsl ----------------------------------------------------------
|
||||
|
||||
half3 viewDir = normalize(half3(i.wPos_xyz_fog_x.xyz - _WorldSpaceCameraPos));
|
||||
#if defined(FOG_LINEAR) || defined(FOG_EXP) || defined(FOG_EXP2)
|
||||
#if defined(SLZ_PARTICLE_ADDITIVE)
|
||||
f.color.rgb *= 1.0 - ComputeFogIntensity(i.wPos_xyz_fog_x.w);
|
||||
#elif defined(SLZ_PARTICLE_MULTIPLICATIVE)
|
||||
f.color.rgb = lerp(f.color.rgb, half3(1,1,1), ComputeFogIntensity(i.wPos_xyz_fog_x.w));
|
||||
#elif defined(SLZ_PARTICLE_ALPHABLEND)
|
||||
f.color.rgb = MixFog(f.color.rgb, viewDir, i.wPos_xyz_fog_x.w);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
#if defined(SLZ_PARTICLE_ADDITIVE)
|
||||
#if defined(_VOLUMETRICS_ENABLED)
|
||||
f.color *= GetVolumetricColor(i.wPos_xyz_fog_x.xyz).a;
|
||||
#endif
|
||||
#elif defined(SLZ_PARTICLE_ALPHABLEND)
|
||||
f.color = Volumetrics(f.color, i.wPos_xyz_fog_x.xyz);
|
||||
#endif
|
||||
|
||||
// Begin Injection FRAG_END from Injection_Particle_SoftBlend.hlsl ----------------------------------------------------------
|
||||
#if defined(SHADER_API_MOBILE)
|
||||
half noise = GetScreenNoiseR(screenUVs);
|
||||
f.depth = SLZSoftBlendZTest(i.vertex.z, noise, _SoftFactor);
|
||||
#else
|
||||
float rawDepth = SampleSceneDepth(screenUVs);
|
||||
float viewZ = dot(GetWorldToViewMatrix()._m20_m21_m22_m23, float4(i.wPos_xyz_fog_x.xyz, 1));
|
||||
float fade = SLZSoftBlendDepth(rawDepth, viewZ, _SoftFactor);
|
||||
#if defined(SLZ_PARTICLE_ADDITIVE)
|
||||
f.color *= fade;
|
||||
#elif defined(SLZ_PARTICLE_MULTIPLICATIVE)
|
||||
f.color = lerp(fade, float4(1,1,1,1), f.color));
|
||||
#else
|
||||
f.color.a *= fade;
|
||||
#endif
|
||||
#endif
|
||||
// End Injection FRAG_END from Injection_Particle_SoftBlend.hlsl ----------------------------------------------------------
|
||||
|
||||
return f;
|
||||
}
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 2313d59684d119840a78fee73c48959a
|
||||
ShaderIncludeImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
|
@ -0,0 +1 @@
|
|||
v.vertex.xyz = ParticleFaceCamera(v.vertex.xyz, v.ase_texcoord1.xyz);
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 0e6e0041457dfeb47936aa37f7c4bfdf
|
||||
ShaderIncludeImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
|
@ -0,0 +1 @@
|
|||
v.vertex.xyz = MeshFlareBillboard(v.vertex.xyz);
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 75872890b046c074fac20ab6d18e52b1
|
||||
ShaderIncludeImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
|
@ -0,0 +1,94 @@
|
|||
float3 centerEyePos()
|
||||
{
|
||||
#if defined(UNITY_STEREO_MULTIVIEW_ENABLED) || defined(UNITY_STEREO_INSTANCING_ENABLED)
|
||||
return 0.5 * (unity_StereoWorldSpaceCameraPos[0] + unity_StereoWorldSpaceCameraPos[1]);
|
||||
#else
|
||||
return _WorldSpaceCameraPos;
|
||||
#endif
|
||||
}
|
||||
|
||||
/** Rotates a particle to face the camera in a more vr-correct way than unity's default particle system
|
||||
*
|
||||
*/
|
||||
|
||||
float3 particle_face_camera(float3 vertex, inout float3 normal, inout float3 center)
|
||||
{
|
||||
vertex.xyz -= center;
|
||||
|
||||
float3 head = centerEyePos();
|
||||
float3 centerToEye = normalize(center-head);
|
||||
float c2eXZLen = length(centerToEye.xz);
|
||||
float sin1 = -centerToEye.y;
|
||||
float cos1 = c2eXZLen;
|
||||
float2x2 rotPitch = float2x2(cos1, sin1, -sin1, cos1);
|
||||
|
||||
vertex.zy = mul(rotPitch, vertex.zy);
|
||||
normal.zy = mul(rotPitch, normal.zy);
|
||||
//tangent.zy = mul(rotPitch, tangent.zy);
|
||||
|
||||
float sin2 = centerToEye.x/c2eXZLen;
|
||||
float cos2 = centerToEye.z/c2eXZLen;
|
||||
float2x2 rotYaw = float2x2(cos2, sin2, -sin2, cos2);
|
||||
|
||||
vertex.xz = mul(rotYaw,vertex.xz);
|
||||
normal.xz = mul(rotYaw,normal.xz);
|
||||
//tangent.xz = mul(rotYaw,tangent.xz);
|
||||
|
||||
vertex.xyz += center;
|
||||
return vertex;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
float3 ParticleFaceCamera(float3 vertex, float3 center)
|
||||
{
|
||||
vertex.xyz -= center;
|
||||
|
||||
float3 head = centerEyePos();
|
||||
float3 centerToEye = normalize(center - head);
|
||||
float c2eXZLen = length(centerToEye.xz);
|
||||
float sin1 = -centerToEye.y;
|
||||
float cos1 = c2eXZLen;
|
||||
float2x2 rotPitch = float2x2(cos1, sin1, -sin1, cos1);
|
||||
|
||||
vertex.zy = mul(rotPitch, vertex.zy);
|
||||
|
||||
|
||||
float sin2 = centerToEye.x / c2eXZLen;
|
||||
float cos2 = centerToEye.z / c2eXZLen;
|
||||
float2x2 rotYaw = float2x2(cos2, sin2, -sin2, cos2);
|
||||
|
||||
vertex.xz = mul(rotYaw, vertex.xz);
|
||||
|
||||
|
||||
vertex.xyz += center;
|
||||
return vertex;
|
||||
}
|
||||
|
||||
float3 MeshFaceCamera(float3 vertex)
|
||||
{
|
||||
float3 center = float3(0,0,0);
|
||||
//vertex = TransformObjectToWorld(vertex);
|
||||
|
||||
float3 head = TransformWorldToObject(centerEyePos());
|
||||
float3 centerToEye = normalize(center - head);
|
||||
float c2eXZLen = length(centerToEye.xz);
|
||||
float sin1 = -centerToEye.y;
|
||||
float cos1 = c2eXZLen;
|
||||
float2x2 rotPitch = float2x2(cos1, sin1, -sin1, cos1);
|
||||
|
||||
vertex.zy = mul(rotPitch, vertex.zy);
|
||||
|
||||
|
||||
float sin2 = centerToEye.x / c2eXZLen;
|
||||
float cos2 = centerToEye.z / c2eXZLen;
|
||||
float2x2 rotYaw = float2x2(cos2, sin2, -sin2, cos2);
|
||||
|
||||
vertex.xz = mul(rotYaw, vertex.xz);
|
||||
|
||||
|
||||
//vertex.xyz += center;
|
||||
return vertex;
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 40dd6881c3760054cacc50fdba7554dc
|
||||
ShaderIncludeImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
#if defined(SHADER_API_MOBILE) // Quest 2 (XR2) works better with combined texture-samplers apparently
|
||||
|
||||
#ifdef TEXTURE2D
|
||||
#undef TEXTURE2D
|
||||
#endif
|
||||
#ifdef SAMPLER
|
||||
#undef SAMPLER
|
||||
#endif
|
||||
#ifdef SAMPLE_TEXTURE2D
|
||||
#undef SAMPLE_TEXTURE2D
|
||||
#endif
|
||||
|
||||
#define TEXTURE2D(textureName) sampler2D textureName
|
||||
#define SAMPLER(samplerName)
|
||||
#define SAMPLE_TEXTURE2D(textureName, samplerName, coord) tex2D(textureName, coord)
|
||||
#endif
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 6aab105c75192124887c893201ce93e0
|
||||
ShaderIncludeImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
|
@ -0,0 +1,95 @@
|
|||
#if !defined(SLZ_TRIPLANAR_INCLUDED)
|
||||
#define SLZ_TRIPLANAR_INCLUDED
|
||||
//#define TEXTURE2D_PARAM(textureName, samplerName) Texture2D textureName, sampler samplerName
|
||||
|
||||
/**
|
||||
* Struct containg the ddx and ddy of the uvs combined into one half4 for each axis
|
||||
*/
|
||||
struct tpDerivatives
|
||||
{
|
||||
half4 ddX;
|
||||
half4 ddY;
|
||||
half4 ddZ;
|
||||
};
|
||||
|
||||
/**
|
||||
* Gets the derivatives of the worldspace coordinates reduced to 3 2 dimensional planes defined by each axis
|
||||
*
|
||||
* @param wPos Worldspace position
|
||||
* @param[out] dd struct containing the x and y derivatives of each plane
|
||||
*/
|
||||
void GetDirectionalDerivatives(float3 wPos, out tpDerivatives dd)
|
||||
{
|
||||
dd.ddX.xy = ddx(wPos.zy);
|
||||
dd.ddY.xy = ddx(wPos.xz);
|
||||
dd.ddZ.xy = ddx(wPos.xy);
|
||||
dd.ddX.zw = ddy(wPos.zy);
|
||||
dd.ddY.zw = ddy(wPos.xz);
|
||||
dd.ddZ.zw = ddy(wPos.xy);
|
||||
}
|
||||
|
||||
/**
|
||||
* Determines the worldspace axis that the given mesh normal is most closely aligned to, and returns the coordinates of the
|
||||
* pixel in the plane aligned with that axis and the derivatives associated with that plane. Also generates a tangent to world
|
||||
* matrix using the axes orthogonal to the dominant axis as the tangent and bitangent.
|
||||
*
|
||||
* @param[out] triplanarUV Coordinates of the fragment in the plane aligned with the dominant axis
|
||||
* @param[out] ddxMax X derivatives of the coordinates of the fragment in the plane aligned with the dominant axis
|
||||
* @param[out] ddyMax Y derivatives of the coordinates of the fragment in the plane aligned with the dominant axis
|
||||
* @param[out] tanToWrld Tangent to world matrix composed of the other two axes as tangent and bitangent, and the mesh normal as the normal
|
||||
* @param wPos World-space position of the fragment
|
||||
* @param wNorm World-space mesh normal
|
||||
* @param dd derivatives of the fragment's coordinates in each axis aligned plane
|
||||
*/
|
||||
void GetTPUVExpensive(out float2 triplanarUV, out half2 ddxMax, out half2 ddyMax, out half3x3 tanToWrld, float3 wPos, half3 wNorm,
|
||||
tpDerivatives dd)
|
||||
{
|
||||
half3 dir;
|
||||
dir.x = abs(wNorm.x) > abs(wNorm.y) && abs(wNorm.x) > abs(wNorm.z) ? 1 : 0;
|
||||
dir.y = abs(wNorm.y) >= abs(wNorm.x) && abs(wNorm.y) > abs(wNorm.z) ? 1 : 0;
|
||||
dir.z = abs(wNorm.z) >= abs(wNorm.y) && abs(wNorm.z) >= abs(wNorm.x) ? 1 : 0;
|
||||
half3 dirSign = sign(wNorm);
|
||||
dirSign.z = -dirSign.z; // u should be flipped on Z
|
||||
ddxMax = dir.x * dd.ddX.xy + dir.y * dd.ddY.xy + dir.z * dd.ddZ.xy;
|
||||
ddyMax = dir.x * dd.ddX.zw + dir.y * dd.ddY.zw + dir.z * dd.ddZ.zw;
|
||||
//half3 maxDir = half3(dirX, dirY, dirZ);
|
||||
float2 uvX = wPos.zy * float2(dirSign.x, 1.0);
|
||||
triplanarUV = dir.x * uvX;
|
||||
float2 uvY = wPos.xz * float2(dirSign.y, 1.0);
|
||||
triplanarUV = mad(dir.y, uvY, triplanarUV);
|
||||
float2 uvZ = wPos.xy * float2(dirSign.z, 1.0);
|
||||
triplanarUV = mad(dir.z, uvZ, triplanarUV);
|
||||
|
||||
|
||||
tanToWrld = half3x3(
|
||||
dir.y * dirSign.y + dir.z * dirSign.z, 0, wNorm.x,
|
||||
0, dir.x + dir.z, wNorm.y,
|
||||
dir.x * dirSign.x, dir.y, wNorm.z
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
void GetTPUVCheap(out float2 triplanarUV, out half3x3 tanToWrld, float3 wPos, half3 wNorm)
|
||||
{
|
||||
half3 dir;
|
||||
dir.x = abs(wNorm.x) > abs(wNorm.y) && abs(wNorm.x) > abs(wNorm.z) ? 1 : 0;
|
||||
dir.y = abs(wNorm.y) >= abs(wNorm.x) && abs(wNorm.y) > abs(wNorm.z) ? 1 : 0;
|
||||
dir.z = abs(wNorm.z) >= abs(wNorm.y) && abs(wNorm.z) >= abs(wNorm.x) ? 1 : 0;
|
||||
half3 dirSign = sign(wNorm);
|
||||
dirSign.z = -dirSign.z; // u should be flipped on Z
|
||||
//half3 maxDir = half3(dirX, dirY, dirZ);
|
||||
float2 uvX = wPos.zy * float2(dirSign.x, 1.0);
|
||||
triplanarUV = dir.x * uvX;
|
||||
float2 uvY = wPos.xz * float2(dirSign.y, 1.0);
|
||||
triplanarUV = mad(dir.y, uvY, triplanarUV);
|
||||
float2 uvZ = wPos.xy * float2(dirSign.z, 1.0);
|
||||
triplanarUV = mad(dir.z, uvZ, triplanarUV);
|
||||
|
||||
tanToWrld = half3x3(
|
||||
dir.y * dirSign.y + dir.z * dirSign.z, 0, wNorm.x,
|
||||
0, dir.x + dir.z, wNorm.y,
|
||||
dir.x * dirSign.x, dir.y, wNorm.z
|
||||
);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 225aec2e7a259b642a9fa1a4d10d7aac
|
||||
ShaderIncludeImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
|
@ -0,0 +1,225 @@
|
|||
Shader "SLZ/Mod2x"
|
||||
{
|
||||
Properties
|
||||
{
|
||||
[HideInInspector] _AlphaCutoff("Alpha Cutoff ", Range(0, 1)) = 0.5
|
||||
[HideInInspector] _EmissionColor("Emission Color", Color) = (1,1,1,1)
|
||||
_MainTex("MainTex", 2D) = "gray" {}
|
||||
[HDR]_Color("Color", Color) = (1,1,1,0)
|
||||
_OffsetUnits("OffsetUnits", Int) = -2
|
||||
_OffsetFactor("OffsetFactor", Int) = -2
|
||||
_Multiplier("Multiplier", Float) = 1
|
||||
[Toggle(_ALPHA_ON)] _alpha("alpha", Float) = 0
|
||||
[Toggle(_VERTEXCOLORS_ON)] _VertexColors("VertexColors", Float) = 1
|
||||
// [HideInInspector] _texcoord( "", 2D ) = "white" {}
|
||||
|
||||
// [HideInInspector]_QueueOffset("_QueueOffset", Float) = 0
|
||||
// [HideInInspector]_QueueControl("_QueueControl", Float) = -1
|
||||
// [HideInInspector][NoScaleOffset]unity_Lightmaps("unity_Lightmaps", 2DArray) = "" {}
|
||||
// [HideInInspector][NoScaleOffset]unity_LightmapsInd("unity_LightmapsInd", 2DArray) = "" {}
|
||||
// [HideInInspector][NoScaleOffset]unity_ShadowMasks("unity_ShadowMasks", 2DArray) = "" {}
|
||||
}
|
||||
|
||||
SubShader
|
||||
{
|
||||
LOD 0
|
||||
|
||||
Tags { "RenderPipeline"="UniversalPipeline" "RenderType"="Transparent" "Queue"="Transparent-499" "IgnoreProjector" = "True"}
|
||||
|
||||
Cull Back
|
||||
AlphaToMask Off
|
||||
|
||||
HLSLINCLUDE
|
||||
#pragma target 5.0
|
||||
#include_with_pragmas "Packages/com.unity.render-pipelines.universal/ShaderLibrary/PlatformCompiler.hlsl"
|
||||
ENDHLSL
|
||||
|
||||
Pass
|
||||
{
|
||||
|
||||
Name "Forward"
|
||||
Tags { "LightMode"="UniversalForward" }
|
||||
|
||||
Blend DstColor SrcColor
|
||||
ZWrite Off
|
||||
ZTest LEqual
|
||||
Offset [_OffsetFactor] , [_OffsetUnits]
|
||||
ColorMask RGBA
|
||||
|
||||
HLSLPROGRAM
|
||||
|
||||
#define _RECEIVE_SHADOWS_OFF 1
|
||||
#pragma multi_compile_instancing
|
||||
#define ASE_SRP_VERSION 999999
|
||||
#define SHADERPASS SHADERPASS_UNLIT
|
||||
|
||||
#pragma vertex vert
|
||||
#pragma fragment frag
|
||||
|
||||
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Color.hlsl"
|
||||
#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/Texture.hlsl"
|
||||
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl"
|
||||
//#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Lighting.hlsl"
|
||||
//#include "Packages/com.unity.render-pipelines.core/ShaderLibrary/TextureStack.hlsl"
|
||||
//#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/ShaderGraphFunctions.hlsl"
|
||||
//#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/DBuffer.hlsl"
|
||||
//#include "Packages/com.unity.render-pipelines.universal/Editor/ShaderGraph/Includes/ShaderPass.hlsl"
|
||||
//#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Debug/Debugging3D.hlsl"
|
||||
//#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Input.hlsl"
|
||||
//#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/SurfaceData.hlsl"
|
||||
|
||||
|
||||
#define ASE_NEEDS_FRAG_COLOR
|
||||
#define ASE_NEEDS_FRAG_WORLD_POSITION
|
||||
#pragma shader_feature _ALPHA_ON
|
||||
#pragma shader_feature _VERTEXCOLORS_ON
|
||||
#pragma multi_compile _ _VOLUMETRICS_ENABLED
|
||||
#pragma multi_compile_fog
|
||||
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/DeclareOpaqueTexture.hlsl"
|
||||
|
||||
|
||||
struct VertexInput
|
||||
{
|
||||
float4 vertex : POSITION;
|
||||
float3 ase_normal : NORMAL;
|
||||
float4 ase_texcoord : TEXCOORD0;
|
||||
float4 ase_color : COLOR;
|
||||
UNITY_VERTEX_INPUT_INSTANCE_ID
|
||||
};
|
||||
|
||||
struct VertexOutput
|
||||
{
|
||||
float4 clipPos : SV_POSITION;
|
||||
float3 worldPos : TEXCOORD0;
|
||||
float fogFactor : TEXCOORD2;
|
||||
float4 ase_texcoord3 : TEXCOORD3;
|
||||
float4 ase_color : COLOR;
|
||||
float4 ase_texcoord4 : TEXCOORD4;
|
||||
UNITY_VERTEX_INPUT_INSTANCE_ID
|
||||
UNITY_VERTEX_OUTPUT_STEREO
|
||||
};
|
||||
|
||||
CBUFFER_START(UnityPerMaterial)
|
||||
float4 _MainTex_ST;
|
||||
float4 _Color;
|
||||
int _OffsetUnits;
|
||||
int _OffsetFactor;
|
||||
float _Multiplier;
|
||||
CBUFFER_END
|
||||
sampler2D _MainTex;
|
||||
|
||||
shared float _StaticLightMultiplier;
|
||||
|
||||
|
||||
VertexOutput VertexFunction ( VertexInput v )
|
||||
{
|
||||
VertexOutput o = (VertexOutput)0;
|
||||
UNITY_SETUP_INSTANCE_ID(v);
|
||||
UNITY_TRANSFER_INSTANCE_ID(v, o);
|
||||
UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(o);
|
||||
|
||||
float4 ase_clipPos = TransformObjectToHClip((v.vertex).xyz);
|
||||
float4 screenPos = ComputeScreenPos(ase_clipPos);
|
||||
o.ase_texcoord4 = screenPos;
|
||||
o.ase_texcoord3.xy = v.ase_texcoord.xy;
|
||||
o.ase_color = v.ase_color;
|
||||
//setting value to unused interpolator channels and avoid initialization warnings
|
||||
o.ase_texcoord3.zw = 0;
|
||||
v.ase_normal = v.ase_normal;
|
||||
|
||||
float3 positionWS = TransformObjectToWorld( v.vertex.xyz );
|
||||
float4 positionCS = TransformWorldToHClip( positionWS );
|
||||
|
||||
#if defined(ASE_NEEDS_FRAG_WORLD_POSITION)
|
||||
o.worldPos = positionWS;
|
||||
#endif
|
||||
o.fogFactor = ComputeFogFactor( positionCS.z );
|
||||
o.clipPos = positionCS;
|
||||
return o;
|
||||
}
|
||||
|
||||
VertexOutput vert ( VertexInput v )
|
||||
{
|
||||
return VertexFunction( v );
|
||||
}
|
||||
|
||||
half3 Mod2xFog(half3 fragColor, half fogFactor)
|
||||
{
|
||||
#if defined(FOG_LINEAR) || defined(FOG_EXP) || defined(FOG_EXP2)
|
||||
half fogIntensity = ComputeFogIntensity(fogFactor);
|
||||
fragColor = lerp(0.5, fragColor, fogIntensity);
|
||||
#endif
|
||||
return fragColor;
|
||||
}
|
||||
|
||||
half4 frag ( VertexOutput IN ) : SV_Target
|
||||
{
|
||||
UNITY_SETUP_INSTANCE_ID( IN );
|
||||
UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX( IN );
|
||||
#if defined(ASE_NEEDS_FRAG_WORLD_POSITION)
|
||||
float3 WorldPosition = IN.worldPos;
|
||||
#endif
|
||||
float localMyCustomExpression1_g126 = ( 0.0 );
|
||||
float2 uv_MainTex = IN.ase_texcoord3.xy * _MainTex_ST.xy + _MainTex_ST.zw;
|
||||
float4 appendResult52 = (float4(1.0 , 1.0 , 1.0 , IN.ase_color.a));
|
||||
#ifdef _VERTEXCOLORS_ON
|
||||
float4 staticSwitch38 = IN.ase_color;
|
||||
#else
|
||||
float4 staticSwitch38 = appendResult52;
|
||||
#endif
|
||||
float4 temp_output_16_0 = ( tex2D( _MainTex, uv_MainTex ) * _Color * staticSwitch38 );
|
||||
float4 temp_output_26_0 = ( ( ( temp_output_16_0 - .5 ) * _Multiplier ) + 0.5 );
|
||||
#ifdef _ALPHA_ON
|
||||
float4 lerpResult30 = lerp( .5 , temp_output_26_0 , (temp_output_16_0).a);
|
||||
float4 staticSwitch28 = lerpResult30;
|
||||
#else
|
||||
float4 staticSwitch28 = temp_output_26_0;
|
||||
#endif
|
||||
float4 color1_g126 = staticSwitch28;
|
||||
float localMyCustomExpression24_g126 = ( 0.0 );
|
||||
float4 screenPos = IN.ase_texcoord4;
|
||||
float4 ase_screenPosNorm = screenPos / screenPos.w;
|
||||
ase_screenPosNorm.z = ( UNITY_NEAR_CLIP_VALUE >= 0 ) ? ase_screenPosNorm.z : ase_screenPosNorm.z * 0.5 + 0.5;
|
||||
float2 uv24_g126 = (ase_screenPosNorm).xy;
|
||||
|
||||
float3 BakedAlbedo = 0;
|
||||
float3 BakedEmission = 0;
|
||||
float3 Color = color1_g126.xyz;
|
||||
float Alpha = 1;
|
||||
float AlphaClipThreshold = 0.5;
|
||||
float AlphaClipThresholdShadow = 0.5;
|
||||
|
||||
#ifdef _ALPHATEST_ON
|
||||
clip( Alpha - AlphaClipThreshold );
|
||||
#endif
|
||||
|
||||
#if defined(_ALPHAPREMULTIPLY_ON)
|
||||
Color *= Alpha;
|
||||
#endif
|
||||
|
||||
#ifdef LOD_FADE_CROSSFADE
|
||||
LODDitheringTransition( IN.clipPos.xyz, unity_LODFade.x );
|
||||
#endif
|
||||
|
||||
Color.rgb = Mod2xFog( Color, IN.fogFactor );
|
||||
|
||||
#if defined(_VOLUMETRICS_ENABLED)
|
||||
//works fine on the PC but not quest. Using a semi-plausible result otherwise.
|
||||
#if !defined(SHADER_API_MOBILE)
|
||||
half3 FroxelColor = GetVolumetricColor(WorldPosition).rgb;
|
||||
Color.rgb = Color.rgb - 0.5* (2.0*Color.rgb - 1.0) * FroxelColor / SampleSceneColor(uv24_g126).rgb;
|
||||
#else
|
||||
half4 FroxelColor = GetVolumetricColor(IN.worldPos);
|
||||
Color.rgb = Color.rgb + (saturate(FroxelColor.rgb)*(0.5-Color.rgb)); //rgb lerp //x + s(y-x)
|
||||
Color.rgb = lerp(0.5, Color , saturate(FroxelColor.a*FroxelColor.a) );
|
||||
#endif
|
||||
#endif
|
||||
|
||||
return half4( Color, Alpha );
|
||||
}
|
||||
|
||||
ENDHLSL
|
||||
}
|
||||
}
|
||||
Fallback "Hidden/InternalErrorShader"
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue