summaryrefslogtreecommitdiff
path: root/Assets/MaterializeFX/Shaders/Standart/UnityStandardMeta.cginc
diff options
context:
space:
mode:
authorchai <chaifix@163.com>2020-10-23 13:08:43 +0800
committerchai <chaifix@163.com>2020-10-23 13:08:43 +0800
commitb82da95b5181ac8bbae38efb13e950d5e88a4caa (patch)
tree48a6f3269276484bbc7cfc95f0651f40a2176aa1 /Assets/MaterializeFX/Shaders/Standart/UnityStandardMeta.cginc
parent917e9e0b320775634dc2e710f7deac74fd0822f0 (diff)
*移动amplify shader editor到third party目录
Diffstat (limited to 'Assets/MaterializeFX/Shaders/Standart/UnityStandardMeta.cginc')
-rw-r--r--Assets/MaterializeFX/Shaders/Standart/UnityStandardMeta.cginc64
1 files changed, 0 insertions, 64 deletions
diff --git a/Assets/MaterializeFX/Shaders/Standart/UnityStandardMeta.cginc b/Assets/MaterializeFX/Shaders/Standart/UnityStandardMeta.cginc
deleted file mode 100644
index 37ce2a5b..00000000
--- a/Assets/MaterializeFX/Shaders/Standart/UnityStandardMeta.cginc
+++ /dev/null
@@ -1,64 +0,0 @@
-// Unity built-in shader source. Copyright (c) 2016 Unity Technologies. MIT license (see license.txt)
-
-#ifndef UNITY_STANDARD_META_INCLUDED
-#define UNITY_STANDARD_META_INCLUDED
-
-// Functionality for Standard shader "meta" pass
-// (extracts albedo/emission for lightmapper etc.)
-
-// define meta pass before including other files; they have conditions
-// on that in some places
-#define UNITY_PASS_META 1
-
-#include "UnityCG.cginc"
-#include "UnityStandardInput.cginc"
-#include "UnityMetaPass.cginc"
-#include "UnityStandardCore.cginc"
-
-struct v2f_meta
-{
- float4 uv : TEXCOORD0;
- float4 pos : SV_POSITION;
-};
-
-v2f_meta vert_meta (VertexInput v)
-{
- v2f_meta o;
- o.pos = UnityMetaVertexPosition(v.vertex, v.uv1.xy, v.uv2.xy, unity_LightmapST, unity_DynamicLightmapST);
- o.uv = TexCoords(v);
- return o;
-}
-
-// Albedo for lightmapping should basically be diffuse color.
-// But rough metals (black diffuse) still scatter quite a lot of light around, so
-// we want to take some of that into account too.
-half3 UnityLightmappingAlbedo (half3 diffuse, half3 specular, half smoothness)
-{
- half roughness = SmoothnessToRoughness(smoothness);
- half3 res = diffuse;
- res += specular * roughness * 0.5;
- return res;
-}
-
-float4 frag_meta (v2f_meta i) : SV_Target
-{
- // we're interested in diffuse & specular colors,
- // and surface roughness to produce final albedo.
- FragmentCommonData data = UNITY_SETUP_BRDF_INPUT (i.uv, float4(0, 0, 0, 0), float3(0, 0, 0));
-
- UnityMetaInput o;
- UNITY_INITIALIZE_OUTPUT(UnityMetaInput, o);
-
-#if defined(EDITOR_VISUALIZATION)
- o.Albedo = data.diffColor;
-#else
- o.Albedo = UnityLightmappingAlbedo (data.diffColor, data.specColor, data.smoothness);
-#endif
- o.SpecularColor = data.specColor;
-
- o.Emission = Emission(i.uv.xy);
-
- return UnityMetaFragment(o);
-}
-
-#endif // UNITY_STANDARD_META_INCLUDED