diff options
Diffstat (limited to 'Third_Party/at.pimaker.ltcgi/Shaders')
6 files changed, 0 insertions, 670 deletions
diff --git a/Third_Party/at.pimaker.ltcgi/Shaders/Amplify/AmplifyTest.mat b/Third_Party/at.pimaker.ltcgi/Shaders/Amplify/AmplifyTest.mat deleted file mode 100644 index 6ba2676..0000000 --- a/Third_Party/at.pimaker.ltcgi/Shaders/Amplify/AmplifyTest.mat +++ /dev/null @@ -1,87 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!21 &2100000 -Material: - serializedVersion: 6 - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_Name: AmplifyTest - m_Shader: {fileID: 4800000, guid: dbf90271d2d7a4946a1e653600c88ca3, type: 3} - m_ShaderKeywords: - m_LightmapFlags: 0 - m_EnableInstancingVariants: 0 - m_DoubleSidedGI: 0 - m_CustomRenderQueue: -1 - stringTagMap: {} - disabledShaderPasses: [] - m_SavedProperties: - serializedVersion: 3 - m_TexEnvs: - - _BumpMap: - m_Texture: {fileID: 2800000, guid: 5f34f31b510450b4b86b7554ea158d12, type: 3} - m_Scale: {x: 0.2, y: 0.2} - m_Offset: {x: 0, y: 0} - - _DetailAlbedoMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _DetailMask: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _DetailNormalMap: - 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: 2800000, guid: 4ac0d09ca8633a642b5c5b4cc91e02d0, type: 3} - m_Scale: {x: 0.2, y: 0.2} - m_Offset: {x: 0, y: 0} - - _MetallicGlossMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _OcclusionMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _ParallaxMap: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _texcoord: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - - _texcoord2: - m_Texture: {fileID: 0} - m_Scale: {x: 1, y: 1} - m_Offset: {x: 0, y: 0} - m_Floats: - - _BumpScale: 1 - - _Cutoff: 0.5 - - _DetailNormalMapScale: 1 - - _DstBlend: 0 - - _GlossMapScale: 1 - - _Glossiness: 0.5 - - _GlossyReflections: 1 - - _Metallic: 0 - - _Mode: 0 - - _OcclusionStrength: 1 - - _Parallax: 0.02 - - _Smoothness: 0.925 - - _SmoothnessTextureChannel: 0 - - _SpecularHighlights: 1 - - _SrcBlend: 1 - - _UVSec: 0 - - _ZWrite: 1 - - __dirty: 1 - m_Colors: - - _Color: {r: 1, g: 1, b: 1, a: 1} - - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} diff --git a/Third_Party/at.pimaker.ltcgi/Shaders/Amplify/LTCGI_Amplify.shader b/Third_Party/at.pimaker.ltcgi/Shaders/Amplify/LTCGI_Amplify.shader deleted file mode 100644 index 08e2152..0000000 --- a/Third_Party/at.pimaker.ltcgi/Shaders/Amplify/LTCGI_Amplify.shader +++ /dev/null @@ -1,223 +0,0 @@ -// Made with Amplify Shader Editor -// Available at the Unity Asset Store - http://u3d.as/y3X -Shader "LTCGI_Amplify" -{ - Properties - { - _MainTex("MainTex", 2D) = "white" {} - [Normal]_BumpMap("BumpMap", 2D) = "bump" {} - _Smoothness("Smoothness", Range( 0 , 1)) = 0.5 - [HideInInspector] _texcoord( "", 2D ) = "white" {} - [HideInInspector] _texcoord2( "", 2D ) = "white" {} - [HideInInspector] __dirty( "", Int ) = 1 - } - - SubShader - { - Tags{ "RenderType" = "Opaque" "Queue" = "Geometry+0" "LTCGI"="ALWAYS" } - Cull Back - CGINCLUDE - #include "UnityPBSLighting.cginc" - #include "UnityShaderVariables.cginc" - #include "Lighting.cginc" - #pragma target 3.0 - #include "Assets/_pi_/_LTCGI/Shaders/LTCGI.cginc" - #ifdef UNITY_PASS_SHADOWCASTER - #undef INTERNAL_DATA - #undef WorldReflectionVector - #undef WorldNormalVector - #define INTERNAL_DATA half3 internalSurfaceTtoW0; half3 internalSurfaceTtoW1; half3 internalSurfaceTtoW2; - #define WorldReflectionVector(data,normal) reflect (data.worldRefl, half3(dot(data.internalSurfaceTtoW0,normal), dot(data.internalSurfaceTtoW1,normal), dot(data.internalSurfaceTtoW2,normal))) - #define WorldNormalVector(data,normal) half3(dot(data.internalSurfaceTtoW0,normal), dot(data.internalSurfaceTtoW1,normal), dot(data.internalSurfaceTtoW2,normal)) - #endif - struct Input - { - float2 uv_texcoord; - float3 worldPos; - float3 worldNormal; - INTERNAL_DATA - float2 uv2_texcoord2; - }; - - struct SurfaceOutputCustomLightingCustom - { - half3 Albedo; - half3 Normal; - half3 Emission; - half Metallic; - half Smoothness; - half Occlusion; - half Alpha; - Input SurfInput; - UnityGIInput GIData; - }; - - uniform sampler2D _MainTex; - uniform float4 _MainTex_ST; - uniform sampler2D _BumpMap; - uniform float4 _BumpMap_ST; - uniform float _Smoothness; - - inline half4 LightingStandardCustomLighting( inout SurfaceOutputCustomLightingCustom s, half3 viewDir, UnityGI gi ) - { - UnityGIInput data = s.GIData; - Input i = s.SurfInput; - half4 c = 0; - float localLTCGI15_g1 = ( 0.0 ); - float3 ase_worldPos = i.worldPos; - float3 worldPos15_g1 = ase_worldPos; - float2 uv_BumpMap = i.uv_texcoord * _BumpMap_ST.xy + _BumpMap_ST.zw; - float3 normalizeResult9_g1 = normalize( (WorldNormalVector( i , UnpackNormal( tex2D( _BumpMap, uv_BumpMap ) ) )) ); - float3 worldNorm15_g1 = normalizeResult9_g1; - float3 normalizeResult12_g1 = normalize( ( _WorldSpaceCameraPos - ase_worldPos ) ); - float3 cameraDir15_g1 = normalizeResult12_g1; - float roughness15_g1 = ( 1.0 - _Smoothness ); - float2 lightmapUV15_g1 = i.uv2_texcoord2; - float3 diffuse15_g1 = float3( 0,0,0 ); - float3 specular15_g1 = float3( 0,0,0 ); - float specularIntensity15_g1 = 0; - { - LTCGI_Contribution(worldPos15_g1, worldNorm15_g1, cameraDir15_g1, roughness15_g1, lightmapUV15_g1, diffuse15_g1, specular15_g1, specularIntensity15_g1); - } - c.rgb = ( ( diffuse15_g1 * 0.05 ) + ( specular15_g1 * 1.0 ) ); - c.a = 1; - return c; - } - - inline void LightingStandardCustomLighting_GI( inout SurfaceOutputCustomLightingCustom s, UnityGIInput data, inout UnityGI gi ) - { - s.GIData = data; - } - - void surf( Input i , inout SurfaceOutputCustomLightingCustom o ) - { - o.SurfInput = i; - o.Normal = float3(0,0,1); - float2 uv_MainTex = i.uv_texcoord * _MainTex_ST.xy + _MainTex_ST.zw; - o.Albedo = tex2D( _MainTex, uv_MainTex ).rgb; - } - - ENDCG - CGPROGRAM - #pragma surface surf StandardCustomLighting keepalpha fullforwardshadows - - ENDCG - Pass - { - Name "ShadowCaster" - Tags{ "LightMode" = "ShadowCaster" } - ZWrite On - CGPROGRAM - #pragma vertex vert - #pragma fragment frag - #pragma target 3.0 - #pragma multi_compile_shadowcaster - #pragma multi_compile UNITY_PASS_SHADOWCASTER - #pragma skip_variants FOG_LINEAR FOG_EXP FOG_EXP2 - #include "HLSLSupport.cginc" - #if ( SHADER_API_D3D11 || SHADER_API_GLCORE || SHADER_API_GLES || SHADER_API_GLES3 || SHADER_API_METAL || SHADER_API_VULKAN ) - #define CAN_SKIP_VPOS - #endif - #include "UnityCG.cginc" - #include "Lighting.cginc" - #include "UnityPBSLighting.cginc" - struct v2f - { - V2F_SHADOW_CASTER; - float4 customPack1 : TEXCOORD1; - float4 tSpace0 : TEXCOORD2; - float4 tSpace1 : TEXCOORD3; - float4 tSpace2 : TEXCOORD4; - UNITY_VERTEX_INPUT_INSTANCE_ID - UNITY_VERTEX_OUTPUT_STEREO - }; - v2f vert( appdata_full v ) - { - v2f o; - UNITY_SETUP_INSTANCE_ID( v ); - UNITY_INITIALIZE_OUTPUT( v2f, o ); - UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO( o ); - UNITY_TRANSFER_INSTANCE_ID( v, o ); - Input customInputData; - float3 worldPos = mul( unity_ObjectToWorld, v.vertex ).xyz; - half3 worldNormal = UnityObjectToWorldNormal( v.normal ); - half3 worldTangent = UnityObjectToWorldDir( v.tangent.xyz ); - half tangentSign = v.tangent.w * unity_WorldTransformParams.w; - half3 worldBinormal = cross( worldNormal, worldTangent ) * tangentSign; - o.tSpace0 = float4( worldTangent.x, worldBinormal.x, worldNormal.x, worldPos.x ); - o.tSpace1 = float4( worldTangent.y, worldBinormal.y, worldNormal.y, worldPos.y ); - o.tSpace2 = float4( worldTangent.z, worldBinormal.z, worldNormal.z, worldPos.z ); - o.customPack1.xy = customInputData.uv_texcoord; - o.customPack1.xy = v.texcoord; - o.customPack1.zw = customInputData.uv2_texcoord2; - o.customPack1.zw = v.texcoord1; - TRANSFER_SHADOW_CASTER_NORMALOFFSET( o ) - return o; - } - half4 frag( v2f IN - #if !defined( CAN_SKIP_VPOS ) - , UNITY_VPOS_TYPE vpos : VPOS - #endif - ) : SV_Target - { - UNITY_SETUP_INSTANCE_ID( IN ); - Input surfIN; - UNITY_INITIALIZE_OUTPUT( Input, surfIN ); - surfIN.uv_texcoord = IN.customPack1.xy; - surfIN.uv2_texcoord2 = IN.customPack1.zw; - float3 worldPos = float3( IN.tSpace0.w, IN.tSpace1.w, IN.tSpace2.w ); - half3 worldViewDir = normalize( UnityWorldSpaceViewDir( worldPos ) ); - surfIN.worldPos = worldPos; - surfIN.worldNormal = float3( IN.tSpace0.z, IN.tSpace1.z, IN.tSpace2.z ); - surfIN.internalSurfaceTtoW0 = IN.tSpace0.xyz; - surfIN.internalSurfaceTtoW1 = IN.tSpace1.xyz; - surfIN.internalSurfaceTtoW2 = IN.tSpace2.xyz; - SurfaceOutputCustomLightingCustom o; - UNITY_INITIALIZE_OUTPUT( SurfaceOutputCustomLightingCustom, o ) - surf( surfIN, o ); - #if defined( CAN_SKIP_VPOS ) - float2 vpos = IN.pos; - #endif - SHADOW_CASTER_FRAGMENT( IN ) - } - ENDCG - } - } - Fallback "Diffuse" - CustomEditor "ASEMaterialInspector" -} -/*ASEBEGIN -Version=18935 -536;73;2067;851;779.8046;162.2598;1;True;True -Node;AmplifyShaderEditor.RangedFloatNode;6;-821.1882,196.0575;Inherit;False;Constant;_Float0;Float 0;3;0;Create;True;0;0;0;False;0;False;1;0;0;0;0;1;FLOAT;0 -Node;AmplifyShaderEditor.RangedFloatNode;2;-934.938,98.16958;Inherit;False;Property;_Smoothness;Smoothness;2;0;Create;True;0;0;0;False;0;False;0.5;0.925;0;1;0;1;FLOAT;0 -Node;AmplifyShaderEditor.SimpleSubtractOpNode;5;-635.8664,186.1211;Inherit;False;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0 -Node;AmplifyShaderEditor.TexturePropertyNode;20;-775.5374,331.3456;Inherit;True;Property;_BumpMap;BumpMap;1;1;[Normal];Create;True;0;0;0;False;0;False;None;5f34f31b510450b4b86b7554ea158d12;True;bump;Auto;Texture2D;-1;0;2;SAMPLER2D;0;SAMPLERSTATE;1 -Node;AmplifyShaderEditor.RangedFloatNode;24;-255.1472,222.6049;Inherit;False;Constant;_Float1;Float 1;3;0;Create;True;0;0;0;False;0;False;0.05;0;0;0;0;1;FLOAT;0 -Node;AmplifyShaderEditor.RangedFloatNode;25;-255.1469,448.7357;Inherit;False;Constant;_Float2;Float 2;3;0;Create;True;0;0;0;False;0;False;1;0;0;0;0;1;FLOAT;0 -Node;AmplifyShaderEditor.TexturePropertyNode;15;-478.7493,-90.12699;Inherit;True;Property;_MainTex;MainTex;0;0;Create;True;0;0;0;False;0;False;None;4ac0d09ca8633a642b5c5b4cc91e02d0;False;white;Auto;Texture2D;-1;0;2;SAMPLER2D;0;SAMPLERSTATE;1 -Node;AmplifyShaderEditor.FunctionNode;35;-477.8035,308.7716;Inherit;False;LTCGI_Contribution;-1;;1;d3ea6060590627141a6e856295f0e87c;0;2;18;SAMPLER2D;0;False;21;FLOAT;0;False;3;FLOAT3;16;FLOAT;17;FLOAT3;0 -Node;AmplifyShaderEditor.SimpleMultiplyOpNode;21;-97.38132,256.7875;Inherit;False;2;2;0;FLOAT3;0,0,0;False;1;FLOAT;0;False;1;FLOAT3;0 -Node;AmplifyShaderEditor.SimpleMultiplyOpNode;12;-94.82584,382.3184;Inherit;False;2;2;0;FLOAT3;0,0,0;False;1;FLOAT;0;False;1;FLOAT3;0 -Node;AmplifyShaderEditor.TextureCoordinatesNode;14;-229.4183,-19.4483;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 -Node;AmplifyShaderEditor.SimpleAddOpNode;26;64.32862,318.5789;Inherit;False;2;2;0;FLOAT3;0,0,0;False;1;FLOAT3;0,0,0;False;1;FLOAT3;0 -Node;AmplifyShaderEditor.SamplerNode;1;4.050852,-87.71029;Inherit;True;Property;_Albedo;Albedo;0;0;Fetch;True;0;0;0;False;0;False;-1;None;None;True;0;False;white;Auto;False;Instance;-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 -Node;AmplifyShaderEditor.StandardSurfaceOutputNode;45;387.8991,5.103931;Float;False;True;-1;2;ASEMaterialInspector;0;0;CustomLighting;LTCGI_Amplify;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;Back;0;False;-1;0;False;-1;False;0;False;-1;0;False;-1;False;0;Opaque;0.5;True;True;0;False;Opaque;;Geometry;All;18;all;True;True;True;True;0;False;-1;False;0;False;-1;255;False;-1;255;False;-1;0;False;-1;0;False;-1;0;False;-1;0;False;-1;0;False;-1;0;False;-1;0;False;-1;0;False;-1;False;2;15;10;25;False;0.5;True;0;0;False;-1;0;False;-1;0;0;False;-1;0;False;-1;0;False;-1;0;False;-1;0;False;0;0,0,0,0;VertexOffset;True;False;Cylindrical;False;True;Relative;0;;-1;-1;-1;-1;1;LTCGI=ALWAYS;False;0;0;False;-1;-1;0;False;-1;1;Include;Assets/_pi_/_LTCGI/Shaders/LTCGI.cginc;False;;Custom;0;0;False;0.1;False;-1;0;False;-1;False;15;0;FLOAT3;0,0,0;False;1;FLOAT3;0,0,0;False;2;FLOAT3;0,0,0;False;3;FLOAT3;0,0,0;False;4;FLOAT;0;False;6;FLOAT3;0,0,0;False;7;FLOAT3;0,0,0;False;8;FLOAT;0;False;9;FLOAT;0;False;10;FLOAT;0;False;13;FLOAT3;0,0,0;False;11;FLOAT3;0,0,0;False;12;FLOAT3;0,0,0;False;14;FLOAT4;0,0,0,0;False;15;FLOAT3;0,0,0;False;0 -WireConnection;5;0;6;0 -WireConnection;5;1;2;0 -WireConnection;35;18;20;0 -WireConnection;35;21;5;0 -WireConnection;21;0;35;0 -WireConnection;21;1;24;0 -WireConnection;12;0;35;16 -WireConnection;12;1;25;0 -WireConnection;14;2;15;0 -WireConnection;26;0;21;0 -WireConnection;26;1;12;0 -WireConnection;1;0;15;0 -WireConnection;1;1;14;0 -WireConnection;1;7;15;1 -WireConnection;45;0;1;0 -WireConnection;45;13;26;0 -ASEEND*/ -//CHKSM=2F9669BE0F908372CF1438E7300F30E35C6E2269
\ No newline at end of file diff --git a/Third_Party/at.pimaker.ltcgi/Shaders/Amplify/LTCGI_Contribution.asset b/Third_Party/at.pimaker.ltcgi/Shaders/Amplify/LTCGI_Contribution.asset deleted file mode 100644 index 307676a..0000000 --- a/Third_Party/at.pimaker.ltcgi/Shaders/Amplify/LTCGI_Contribution.asset +++ /dev/null @@ -1,46 +0,0 @@ -%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: LTCGI_Contribution - m_EditorClassIdentifier: - m_functionInfo: "// Made with Amplify Shader Editor\n// Available at the Unity - Asset Store - http://u3d.as/y3X \n/*ASEBEGIN\nVersion=18935\n536;73;2067;851;3119.343;614.295;1.681782;True;True\nNode;AmplifyShaderEditor.WorldSpaceCameraPos;3;-1572.588,304.9969;Inherit;False;0;4;FLOAT3;0;FLOAT;1;FLOAT;2;FLOAT;3\nNode;AmplifyShaderEditor.FunctionInput;21;-1149.124,1.794816;Inherit;False;Roughness;1;1;False;1;0;FLOAT;0;False;1;FLOAT;0\nNode;AmplifyShaderEditor.FunctionInput;18;-2132.389,-209.6327;Inherit;True;Normal - Map;9;0;True;1;0;SAMPLER2D;0;False;1;SAMPLER2D;0\nNode;AmplifyShaderEditor.TextureCoordinatesNode;19;-1906.188,-105.2091;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.SamplerNode;20;-1663.786,-180.0446;Inherit;True;Property;_Albedo;Albedo;0;0;Fetch;True;0;0;0;False;0;False;-1;None;None;True;0;False;white;Auto;True;Instance;-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;FLOAT3;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4\nNode;AmplifyShaderEditor.WorldPosInputsNode;11;-1166,-331.4044;Inherit;False;0;4;FLOAT3;0;FLOAT;1;FLOAT;2;FLOAT;3\nNode;AmplifyShaderEditor.CustomExpressionNode;15;-801.2723,-77.17082;Inherit;False;LTCGI_Contribution(worldPos, - worldNorm, cameraDir, roughness, lightmapUV, diffuse, specular, specularIntensity)@$;7;Call;8;False;worldPos;FLOAT3;0,0,0;In;;Float;False;False;worldNorm;FLOAT3;0,0,0;In;;Float;False;False;cameraDir;FLOAT3;0,0,0;In;;Float;False;False;roughness;FLOAT;0;In;;Inherit;False;False;lightmapUV;FLOAT2;0,0;In;;Float;False;False;diffuse;FLOAT3;0,0,0;Out;;Half;False;False;specular;FLOAT3;0,0,0;Out;;Half;False;False;specularIntensity;FLOAT;0;Out;;Inherit;False;LTCGI;False;False;0;;False;9;0;FLOAT;0;False;1;FLOAT3;0,0,0;False;2;FLOAT3;0,0,0;False;3;FLOAT3;0,0,0;False;4;FLOAT;0;False;5;FLOAT2;0,0;False;6;FLOAT3;0,0,0;False;7;FLOAT3;0,0,0;False;8;FLOAT;0;False;4;FLOAT;0;FLOAT3;7;FLOAT3;8;FLOAT;9\nNode;AmplifyShaderEditor.RangedFloatNode;22;-1407.949,27.19302;Inherit;False;Constant;_DefaultRoughness;Default - Roughness;0;0;Create;True;0;0;0;False;0;False;0.5;0;0;0;0;1;FLOAT;0\nNode;AmplifyShaderEditor.TextureCoordinatesNode;10;-1188.472,117.4048;Inherit;True;1;-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.NormalizeNode;9;-1135.18,-104.5354;Inherit;False;False;1;0;FLOAT3;0,0,0;False;1;FLOAT3;0\nNode;AmplifyShaderEditor.WorldNormalVector;7;-1353.008,-175.4043;Inherit;False;False;1;0;FLOAT3;0,0,1;False;4;FLOAT3;0;FLOAT;1;FLOAT;2;FLOAT;3\nNode;AmplifyShaderEditor.SimpleSubtractOpNode;6;-1253.479,434.9653;Inherit;False;2;0;FLOAT3;0,0,0;False;1;FLOAT3;0,0,0;False;1;FLOAT3;0\nNode;AmplifyShaderEditor.WorldPosInputsNode;4;-1570.679,470.0651;Inherit;False;0;4;FLOAT3;0;FLOAT;1;FLOAT;2;FLOAT;3\nNode;AmplifyShaderEditor.NormalizeNode;12;-1057.422,435.0438;Inherit;False;False;1;0;FLOAT3;0,0,0;False;1;FLOAT3;0\nNode;AmplifyShaderEditor.FunctionOutput;16;-382.1458,1.795166;Inherit;False;False;-1;Specular;0;False;1;0;FLOAT3;0,0,0;False;1;FLOAT3;0\nNode;AmplifyShaderEditor.FunctionOutput;17;-381.1458,95.79517;Inherit;False;False;-1;Specular - Intensity;1;False;1;0;FLOAT;0;False;1;FLOAT;0\nNode;AmplifyShaderEditor.FunctionOutput;0;-382,-94;Inherit;False;True;-1;Diffuse;2;False;1;0;FLOAT3;0,0,0;False;1;FLOAT3;0\nWireConnection;21;0;22;0\nWireConnection;19;2;18;0\nWireConnection;20;0;18;0\nWireConnection;20;1;19;0\nWireConnection;15;1;11;0\nWireConnection;15;2;9;0\nWireConnection;15;3;12;0\nWireConnection;15;4;21;0\nWireConnection;15;5;10;0\nWireConnection;9;0;7;0\nWireConnection;7;0;20;0\nWireConnection;6;0;3;0\nWireConnection;6;1;4;0\nWireConnection;12;0;6;0\nWireConnection;16;0;15;8\nWireConnection;17;0;15;9\nWireConnection;0;0;15;7\nASEEND*/\n//CHKSM=7E6B0A6F8854806C46769C1D40451E18FF4A9344" - m_functionName: - m_description: LTCGI custom contribution function. Make sure to add the custom - Include and Tag directives! - 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: 3 - m_customNodeCategory: - m_previewPosition: 0 - m_hidden: 0 - m_url: https://github.com/PiMaker/ltcgi/wiki#amplify diff --git a/Third_Party/at.pimaker.ltcgi/Shaders/LTCGI_Simple.shader b/Third_Party/at.pimaker.ltcgi/Shaders/LTCGI_Simple.shader deleted file mode 100644 index 512ca47..0000000 --- a/Third_Party/at.pimaker.ltcgi/Shaders/LTCGI_Simple.shader +++ /dev/null @@ -1,91 +0,0 @@ -Shader "LTCGI/Simple" -{ - Properties - { - _MainTex ("Texture", 2D) = "white" {} - _Color ("Color", Color) = (1.0, 1.0, 1.0, 1.0) - - _Roughness ("Roughness", Range(0.0, 1.0)) = 0.5 - - //[ToggleUI] _Debug ("Debug Param, does whatever it wants", float) = 0.0 - } - SubShader - { - // "LTCGI" tag defines that any renderer with this material will - // receive data from the LTCGI editor and Udon scripts. - // Can be either "ALWAYS" or the name of a float ("ToggleUI") - // property on which input will depends. - Tags { "RenderType"="Opaque" "LTCGI"="ALWAYS" } - LOD 100 - - Pass - { - CGPROGRAM - #pragma vertex vert - #pragma fragment frag - #pragma multi_compile_fog - - //#define LTCGI_SPECULAR_OFF - - #include "UnityCG.cginc" - #include "LTCGI.cginc" - - struct v2f - { - float4 uv : TEXCOORD0; - float3 worldPos : TEXCOORD1; - float3 worldNorm : TEXCOORD2; - float4 vertex : SV_POSITION; - }; - - sampler2D _MainTex; - float4 _MainTex_ST; - - float4 _Color; - float _Roughness; - - v2f vert (appdata_full v) - { - v2f o; - o.vertex = UnityObjectToClipPos(v.vertex); - o.worldPos = mul(unity_ObjectToWorld, float4(v.vertex.xyz, 1.0)).xyz; - o.worldNorm = mul(unity_ObjectToWorld, float4(v.normal.xyz, 0.0)).xyz; - o.uv.xy = TRANSFORM_TEX(v.texcoord, _MainTex); - o.uv.zw = v.texcoord1; - return o; - } - - float3 get_camera_pos() { - float3 worldCam; - worldCam.x = unity_CameraToWorld[0][3]; - worldCam.y = unity_CameraToWorld[1][3]; - worldCam.z = unity_CameraToWorld[2][3]; - return worldCam; - } - static float3 camera_pos = get_camera_pos(); - - half4 frag (v2f i) : SV_Target - { - //return half4(tex2Dlod(_LTCGI_mat, float4(i.uv, 0, 0)).rgb, 1); - - half4 col = tex2D(_MainTex, i.uv) * _Color; - half3 diff = 0; - half3 spec = 0; - - LTCGI_Contribution( - i.worldPos, - normalize(i.worldNorm), - normalize(camera_pos - i.worldPos), - _Roughness, - i.uv.zw, - diff, - spec - ); - col.rgb *= saturate(diff + 0.1); - col.rgb += spec; - return col; - } - ENDCG - } - } -} diff --git a/Third_Party/at.pimaker.ltcgi/Shaders/LTCGI_Surface.shader b/Third_Party/at.pimaker.ltcgi/Shaders/LTCGI_Surface.shader deleted file mode 100644 index b4ee68e..0000000 --- a/Third_Party/at.pimaker.ltcgi/Shaders/LTCGI_Surface.shader +++ /dev/null @@ -1,87 +0,0 @@ -Shader "LTCGI/Surface" -{ - Properties - { - _Color ("Color", Color) = (1,1,1,1) - _MainTex ("Albedo (RGB)", 2D) = "white" {} - [HideInInspector] _LightMap ("(for surface ST only)", 2D) = "white" {} - _BumpMap ("Normal Map", 2D) = "bump" {} - _Metallic ("Metallic", Range(0,1)) = 0.0 - _Glossiness ("Smoothness", Range(0,1)) = 0.5 - _GlossinessMap ("Smoothness Map", 2D) = "white" {} - [ToggleUI] _MapIsRoughness ("Invert Smoothness Map", Float) = 0.0 - [ToggleUI] _LTCGI ("LTCGI enabled", Float) = 1.0 - } - SubShader - { - // The LTCGI tag can either be "ALWAYS" or specify a "Toggle"/"ToggleUI" property. - // It is required so that renderers using this material will be updated by the controller. - Tags { "RenderType"="Opaque" "LTCGI"="_LTCGI" } - LOD 200 - - CGPROGRAM - #pragma surface surf Standard fullforwardshadows - #pragma target 3.0 - - #include "LTCGI.cginc" - - sampler2D _MainTex; - sampler2D _BumpMap; - sampler2D _GlossinessMap; - - struct Input - { - float2 uv_MainTex; - float2 uv_BumpMap; - float2 uv2_LightMap; - float3 worldPos; - float3 worldNormal; INTERNAL_DATA - }; - - half _Glossiness; - float _MapIsRoughness; - half _Metallic; - fixed4 _Color; - float _LTCGI; - - float3 get_camera_pos() { - float3 worldCam; - worldCam.x = unity_CameraToWorld[0][3]; - worldCam.y = unity_CameraToWorld[1][3]; - worldCam.z = unity_CameraToWorld[2][3]; - return worldCam; - } - - void surf (Input IN, inout SurfaceOutputStandard o) - { - fixed4 c = tex2D (_MainTex, IN.uv_MainTex) * _Color; - o.Albedo = c.rgb; - o.Metallic = _Metallic; - o.Smoothness = tex2D (_GlossinessMap, IN.uv_MainTex); - if (_MapIsRoughness) - o.Smoothness = 1 - o.Smoothness; - o.Smoothness *= _Glossiness; - o.Alpha = c.a; - - o.Normal = UnpackNormal(tex2D(_BumpMap, IN.uv_BumpMap)); - - if (_LTCGI) { - float3 normal = WorldNormalVector(IN, o.Normal); - float3 spec = 0, diff = 0; - LTCGI_Contribution( - IN.worldPos, - normalize(normal), - normalize(get_camera_pos() - IN.worldPos), - 1 - o.Smoothness, - IN.uv2_LightMap, - diff, - spec - ); - o.Emission += spec; - o.Emission += diff * c; - } - } - ENDCG - } - FallBack "Diffuse" -} diff --git a/Third_Party/at.pimaker.ltcgi/Shaders/LTCGI_Surface_v2.shader b/Third_Party/at.pimaker.ltcgi/Shaders/LTCGI_Surface_v2.shader deleted file mode 100644 index 2cba27b..0000000 --- a/Third_Party/at.pimaker.ltcgi/Shaders/LTCGI_Surface_v2.shader +++ /dev/null @@ -1,136 +0,0 @@ -Shader "LTCGI/Surface (APIv2)" -{ - Properties - { - _Color ("Color", Color) = (1,1,1,1) - _MainTex ("Albedo (RGB)", 2D) = "white" {} - [HideInInspector] _LightMap ("(for surface ST only)", 2D) = "white" {} - _BumpMap ("Normal Map", 2D) = "bump" {} - _Metallic ("Metallic", Range(0,1)) = 0.0 - _Glossiness ("Smoothness", Range(0,1)) = 0.5 - _GlossinessMap ("Smoothness Map", 2D) = "white" {} - [ToggleUI] _MapIsRoughness ("Invert Smoothness Map", Float) = 0.0 - - [ToggleUI] _LTCGI ("LTCGI enabled", Float) = 1.0 - _LTCGI_DiffuseColor ("LTCGI Diffuse Color", Color) = (1,1,1,1) - _LTCGI_SpecularColor ("LTCGI Specular Color", Color) = (1,1,1,1) - } - SubShader - { - // The LTCGI tag can either be "ALWAYS" or specify a "Toggle"/"ToggleUI" property. - // It is required so that renderers using this material will be updated by the controller. - Tags { "RenderType"="Opaque" "LTCGI"="_LTCGI" } - LOD 200 - - CGPROGRAM - #pragma surface surf Standard fullforwardshadows - #pragma target 3.0 - - // This shader demonstrates how to use the APIv2 LTCGI functionality, which has access to per-light callbacks - - // preamble: include this first to get access to required types - #include "Packages/at.pimaker.ltcgi/Shaders/LTCGI_structs.cginc" - - // then define the accumulator type and callback functions (can forward-declare functions to keep things tidy) - // note the function signatures, especially that the accumulator is "inout" so it will keep modifications between calls - struct accumulator_struct { - // let your imagination run wild on what to accumulate here... - float3 diffuse; - float3 specular; - }; - void callback_diffuse(inout accumulator_struct acc, in ltcgi_output output); - void callback_specular(inout accumulator_struct acc, in ltcgi_output output); - - // tell LTCGI that we want the V2 API, and which constructs to use - #define LTCGI_V2_CUSTOM_INPUT accumulator_struct - #define LTCGI_V2_DIFFUSE_CALLBACK callback_diffuse - #define LTCGI_V2_SPECULAR_CALLBACK callback_specular - - // then include this to finish the deal - #include "Packages/at.pimaker.ltcgi/Shaders/LTCGI.cginc" - - // standard shader stuff follows... - sampler2D _MainTex; - sampler2D _BumpMap; - sampler2D _GlossinessMap; - - struct Input - { - float2 uv_MainTex; - float2 uv_BumpMap; - float2 uv2_LightMap; - float3 worldPos; - float3 worldNormal; INTERNAL_DATA - }; - - half _Glossiness; - float _MapIsRoughness; - half _Metallic; - half4 _Color; - float _LTCGI; - half4 _LTCGI_DiffuseColor; - half4 _LTCGI_SpecularColor; - - float3 get_camera_pos() { - float3 worldCam; - worldCam.x = unity_CameraToWorld[0][3]; - worldCam.y = unity_CameraToWorld[1][3]; - worldCam.z = unity_CameraToWorld[2][3]; - return worldCam; - } - - // now we declare LTCGI APIv2 functions for real - void callback_diffuse(inout accumulator_struct acc, in ltcgi_output output) { - // you can do whatever here! check out the ltcgi_output struct in - // "LTCGI_structs.cginc" to see what data you have available - acc.diffuse += output.intensity * output.color * _LTCGI_DiffuseColor; - } - void callback_specular(inout accumulator_struct acc, in ltcgi_output output) { - // same here, this example one is pretty boring though. - // you could accumulate intensity separately for example, - // to emulate total{Specular,Diffuse}Intensity from APIv1 - acc.specular += output.intensity * output.color * _LTCGI_SpecularColor; - } - - void surf (Input IN, inout SurfaceOutputStandard o) - { - // standard surface shader stuff again... - fixed4 mainColor = tex2D (_MainTex, IN.uv_MainTex) * _Color; - o.Albedo = mainColor.rgb; - o.Metallic = _Metallic; - o.Smoothness = tex2D (_GlossinessMap, IN.uv_MainTex); - if (_MapIsRoughness) - o.Smoothness = 1.0f - o.Smoothness; - o.Smoothness *= _Glossiness; - o.Alpha = mainColor.a; - - o.Normal = UnpackNormal(tex2D(_BumpMap, IN.uv_BumpMap)); - float3 worldSpaceNormal = normalize(WorldNormalVector(IN, o.Normal)); - - if (_LTCGI) { - // and lastly, here's how we call the APIv2 version of LTCGI: - - // first, we create the struct that'll be passed through - accumulator_struct acc = (accumulator_struct)0; - - // then we make the LTCGI_Contribution call as usual, but with slightly different params - LTCGI_Contribution( - acc, // our accumulator - IN.worldPos, // world position of the shaded point - worldSpaceNormal, // world space normal - normalize(get_camera_pos() - IN.worldPos), // view vector to shaded point, normalized - 1.0f - o.Smoothness, // roughness - IN.uv2_LightMap // shadowmap coordinates (the normal Unity ones, they should be in sync with LTCGI maps) - ); - - // after the call, our accumulator struct will have been modified by our callbacks - // we can now use it to set the output color - o.Emission += acc.specular; - o.Emission += acc.diffuse * mainColor.rgb; - } - } - ENDCG - } - - FallBack "Diffuse" -}
\ No newline at end of file |
