浏览代码
Added nodes:
Added nodes:
-ReflectionProbe (samples local reflection probe and has exposed LOD, needs blending and box projection added) -LightProbe (samples the light probes SH) Testings scenes and cleanup/main
Andre McGrail
8 年前
当前提交
bc8714b2
共有 112 个文件被更改,包括 13798 次插入 和 2199 次删除
-
931MaterialGraphProject/Assets/GeneratedShader.shader
-
104MaterialGraphProject/Assets/UnityShaderEditor/Editor/HelperShader.shader
-
12MaterialGraphProject/Assets/UnityShaderEditor/Editor/HelperShader.shader.meta
-
14MaterialGraphProject/Assets/UnityShaderEditor/Runtime/Nodes/Input/Texture/CubemapNode.cs
-
8MaterialGraphProject/Assets/Andre/Scenes/Andre_scene.unity
-
23MaterialGraphProject/Assets/Andre/Materials/Mat.mat
-
9MaterialGraphProject/Assets/Andre/Materials/Sky.mat
-
998MaterialGraphProject/Assets/Andre/Scenes/EmissionTest/LightingData.asset
-
4MaterialGraphProject/Assets/Andre/Scenes/LightProbeTesting/ReflectionProbe-0.exr.meta
-
9MaterialGraphProject/Assets/Andre/Materials.meta
-
9MaterialGraphProject/Assets/Andre/Nodes.meta
-
9MaterialGraphProject/Assets/Andre/Scenes.meta
-
9MaterialGraphProject/Assets/Andre/Scripts.meta
-
9MaterialGraphProject/Assets/Andre/Shaders.meta
-
75MaterialGraphProject/Assets/Andre/Materials/Blue.mat
-
9MaterialGraphProject/Assets/Andre/Materials/Blue.mat.meta
-
9MaterialGraphProject/Assets/Andre/Materials/EmissionMaterials.meta
-
50MaterialGraphProject/Assets/Andre/Materials/EmissionMaterials/NewSurfaceShader.shader
-
10MaterialGraphProject/Assets/Andre/Materials/EmissionMaterials/NewSurfaceShader.shader.meta
-
75MaterialGraphProject/Assets/Andre/Materials/EmissionMaterials/defaultSurface.mat
-
9MaterialGraphProject/Assets/Andre/Materials/EmissionMaterials/defaultSurface.mat.meta
-
96MaterialGraphProject/Assets/Andre/Materials/EmissionMaterials/graph.mat
-
9MaterialGraphProject/Assets/Andre/Materials/EmissionMaterials/graph.mat.meta
-
75MaterialGraphProject/Assets/Andre/Materials/EmissionMaterials/std.mat
-
9MaterialGraphProject/Assets/Andre/Materials/EmissionMaterials/std.mat.meta
-
75MaterialGraphProject/Assets/Andre/Materials/Green.mat
-
9MaterialGraphProject/Assets/Andre/Materials/Green.mat.meta
-
75MaterialGraphProject/Assets/Andre/Materials/Red.mat
-
9MaterialGraphProject/Assets/Andre/Materials/Red.mat.meta
-
75MaterialGraphProject/Assets/Andre/Materials/ShinyMat.mat
-
9MaterialGraphProject/Assets/Andre/Materials/ShinyMat.mat.meta
-
93MaterialGraphProject/Assets/Andre/Nodes/LightProbeNode.cs
-
12MaterialGraphProject/Assets/Andre/Nodes/LightProbeNode.cs.meta
-
112MaterialGraphProject/Assets/Andre/Nodes/ReflectionProbeNode.cs
-
12MaterialGraphProject/Assets/Andre/Nodes/ReflectionProbeNode.cs.meta
-
762MaterialGraphProject/Assets/Andre/Scenes/EmissionTest.unity
-
9MaterialGraphProject/Assets/Andre/Scenes/EmissionTest/LightingData.asset.meta
-
9MaterialGraphProject/Assets/Andre/Scenes/LightProbeTesting.meta
-
1001MaterialGraphProject/Assets/Andre/Scenes/LightProbeTesting.unity
-
8MaterialGraphProject/Assets/Andre/Scenes/LightProbeTesting.unity.meta
-
1001MaterialGraphProject/Assets/Andre/Scenes/LightProbeTesting/LightingData.asset
-
9MaterialGraphProject/Assets/Andre/Scenes/LightProbeTesting/LightingData.asset.meta
-
53MaterialGraphProject/Assets/Andre/Scenes/LightProbeTesting/Lightmap-0_comp_dir.png
-
75MaterialGraphProject/Assets/Andre/Scenes/LightProbeTesting/Lightmap-0_comp_dir.png.meta
-
407MaterialGraphProject/Assets/Andre/Scenes/LightProbeTesting/Lightmap-0_comp_light.exr
-
75MaterialGraphProject/Assets/Andre/Scenes/LightProbeTesting/Lightmap-0_comp_light.exr.meta
-
1001MaterialGraphProject/Assets/Andre/Scenes/LightProbeTesting/ReflectionProbe-0.exr
-
9MaterialGraphProject/Assets/Andre/Scenes/ReflectionProbeTesting.meta
-
1001MaterialGraphProject/Assets/Andre/Scenes/ReflectionProbeTesting.unity
-
8MaterialGraphProject/Assets/Andre/Scenes/ReflectionProbeTesting.unity.meta
-
1001MaterialGraphProject/Assets/Andre/Scenes/ReflectionProbeTesting/LightingData.asset
-
9MaterialGraphProject/Assets/Andre/Scenes/ReflectionProbeTesting/LightingData.asset.meta
-
415MaterialGraphProject/Assets/Andre/Scenes/ReflectionProbeTesting/Lightmap-0_comp_dir.png
-
75MaterialGraphProject/Assets/Andre/Scenes/ReflectionProbeTesting/Lightmap-0_comp_dir.png.meta
-
1001MaterialGraphProject/Assets/Andre/Scenes/ReflectionProbeTesting/Lightmap-0_comp_light.exr
-
75MaterialGraphProject/Assets/Andre/Scenes/ReflectionProbeTesting/Lightmap-0_comp_light.exr.meta
-
1001MaterialGraphProject/Assets/Andre/Scenes/ReflectionProbeTesting/ReflectionProbe-0.exr
-
76MaterialGraphProject/Assets/Andre/Scenes/ReflectionProbeTesting/ReflectionProbe-0.exr.meta
-
900MaterialGraphProject/Assets/Andre/Scenes/ReflectionProbeTesting/ReflectionProbe-1.exr
-
76MaterialGraphProject/Assets/Andre/Scenes/ReflectionProbeTesting/ReflectionProbe-1.exr.meta
-
1001MaterialGraphProject/Assets/Andre/Scenes/ReflectionProbeTesting/ReflectionProbe-2.exr
-
76MaterialGraphProject/Assets/Andre/Scenes/ReflectionProbeTesting/ReflectionProbe-2.exr.meta
-
1001MaterialGraphProject/Assets/Andre/Scenes/ReflectionProbeTesting/ReflectionProbe-3.exr
-
76MaterialGraphProject/Assets/Andre/Scenes/ReflectionProbeTesting/ReflectionProbe-3.exr.meta
-
17MaterialGraphProject/Assets/Andre/Scripts/UpdateGI.cs
-
12MaterialGraphProject/Assets/Andre/Scripts/UpdateGI.cs.meta
-
1MaterialGraphProject/Assets/Andre/Shaders/Carpaint.ShaderGraph
-
1MaterialGraphProject/Assets/Andre/Shaders/Cubemap.ShaderGraph
-
1MaterialGraphProject/Assets/Andre/Shaders/EmissionTest.ShaderGraph
-
63MaterialGraphProject/Assets/Andre/Shaders/LightProbeNode.shader
-
10MaterialGraphProject/Assets/Andre/Shaders/LightProbeNode.shader.meta
-
1MaterialGraphProject/Assets/Andre/Shaders/LightThing.ShaderGraph
-
1MaterialGraphProject/Assets/Andre/Shaders/SlopeShader.ShaderGraph
-
1MaterialGraphProject/Assets/Andre/Carpaint.ShaderGraph
-
1MaterialGraphProject/Assets/Andre/Cubemap.ShaderGraph
-
1MaterialGraphProject/Assets/Andre/EmissionTest.ShaderGraph
-
619MaterialGraphProject/Assets/Andre/EmissionTest.unity
-
1MaterialGraphProject/Assets/Andre/LightThing.ShaderGraph
-
1MaterialGraphProject/Assets/Andre/SlopeShader.ShaderGraph
-
0/MaterialGraphProject/Assets/Andre/Scenes/Andre_scene.unity.meta
-
0/MaterialGraphProject/Assets/Andre/Nodes/Editor.meta
-
0/MaterialGraphProject/Assets/Andre/Nodes/Editor
-
0/MaterialGraphProject/Assets/Andre/Nodes/ToggleNode.cs
-
0/MaterialGraphProject/Assets/Andre/Nodes/ToggleNode.cs.meta
-
0/MaterialGraphProject/Assets/Andre/Shaders/FlowMap.ShaderGraph.meta
-
0/MaterialGraphProject/Assets/Andre/Scenes/Andre_scene.meta
-
0/MaterialGraphProject/Assets/Andre/Scenes/Andre_scene.unity
-
0/MaterialGraphProject/Assets/Andre/Scenes/Andre_scene
-
0/MaterialGraphProject/Assets/Andre/Shaders/Carpaint.ShaderGraph.meta
-
0/MaterialGraphProject/Assets/Andre/Shaders/EmissionTest.ShaderGraph.meta
|
|||
Shader "Graph/Generated.AnisotropicMetallicMasterNoded3249a79-099e-4f35-8185-c418a23965c8" |
|||
{ |
|||
Properties |
|||
{ |
|||
Shader "Hidden/PreviewShader/Posterize_f232fbec_5ce8_4ba5_8491_a7a66291d45f_Output" { |
|||
Properties { |
|||
Vector1_20d0d38d_52d0_4444_8ef4_da01a311590e_Uniform("", Float) = 0.1 |
|||
SubShader |
|||
{ |
|||
SubShader { |
|||
// inside SubShader |
|||
"Queue"="Geometry" |
|||
"Queue"="Geometry" |
|||
"IgnoreProjector"="True" |
|||
Blend One Zero |
|||
|
|||
Cull Back |
|||
|
|||
ZTest LEqual |
|||
|
|||
// inside Pass |
|||
|
|||
LOD 200 |
|||
|
|||
CGPROGRAM |
|||
#include "UnityCG.cginc" |
|||
//#include "AdvancedBRDF.cginc" |
|||
//#include "AdvancedShading.cginc" |
|||
//#include "AdvancedLighting.cginc" |
|||
|
|||
#define SHADINGMODELID_STANDARD |
|||
|
|||
|
|||
// ------------------------------------------------------------------ |
|||
// Diffuse |
|||
|
|||
// From UE4 - Used for Cloth (Deprecated) |
|||
float3 Diffuse_Lambert(float3 DiffuseColor) |
|||
{ |
|||
return DiffuseColor * (1 / UNITY_PI); |
|||
} |
|||
|
|||
// ------------------------------------------------------------------ |
|||
// Fresnel |
|||
|
|||
// From UE4 - Used for Cloth |
|||
// [Schlick 1994, "An Inexpensive BRDF Model for Physically-Based Rendering"] |
|||
float3 F_Schlick(float3 SpecularColor, float VoH) |
|||
{ |
|||
float Fc = Pow5(1 - VoH); // 1 sub, 3 mul |
|||
//return Fc + (1 - Fc) * SpecularColor; // 1 add, 3 mad |
|||
// Anything less than 2% is physically impossible and is instead considered to be shadowing |
|||
return saturate(50.0 * SpecularColor.g) * Fc + (1 - Fc) * SpecularColor; |
|||
} |
|||
|
|||
// ------------------------------------------------------------------ |
|||
// Distribution |
|||
|
|||
// From UE4 - USed for Cloth |
|||
// GGX / Trowbridge-Reitz |
|||
// [Walter et al. 2007, "Microfacet models for refraction through rough surfaces"] |
|||
float D_GGX(float roughness, float NdotH) |
|||
{ |
|||
float a = roughness * roughness; |
|||
float a2 = a * a; |
|||
float d = (NdotH * a2 - NdotH) * NdotH + 1; // 2 mad |
|||
return a2 / (UNITY_PI*d*d); // 4 mul, 1 rcp |
|||
} |
|||
|
|||
// Anisotropic GGX |
|||
// Taken from HDRenderPipeline |
|||
float D_GGXAnisotropic(float TdotH, float BdotH, float NdotH, float roughnessT, float roughnessB) |
|||
{ |
|||
float f = TdotH * TdotH / (roughnessT * roughnessT) + BdotH * BdotH / (roughnessB * roughnessB) + NdotH * NdotH; |
|||
return 1.0 / (roughnessT * roughnessB * f * f); |
|||
} |
|||
|
|||
// From UE4 - Used for Cloth |
|||
float D_InvGGX(float roughness, float NdotH) |
|||
{ |
|||
float a = roughness * roughness; |
|||
float a2 = a * a; |
|||
float A = 4; |
|||
float d = (NdotH - a2 * NdotH) * NdotH + a2; |
|||
return 1/(UNITY_PI * (1 + A*a2)) * (1 + 4 * a2*a2 / (d*d)); //RCP |
|||
} |
|||
|
|||
// ------------------------------------------------------------------ |
|||
// Visibility |
|||
|
|||
// From UE4 - Used for Cloth |
|||
// Appoximation of joint Smith term for GGX |
|||
// [Heitz 2014, "Understanding the Masking-Shadowing Function in Microfacet-Based BRDFs"] |
|||
float Vis_SmithJointApprox(float Roughness, float NoV, float NoL) |
|||
{ |
|||
float a = (Roughness*Roughness); |
|||
float Vis_SmithV = NoL * (NoV * (1 - a) + a); |
|||
float Vis_SmithL = NoV * (NoL * (1 - a) + a); |
|||
// Note: will generate NaNs with Roughness = 0. MinRoughness is used to prevent this |
|||
return 0.5 * 1/(Vis_SmithV + Vis_SmithL); //RCP |
|||
} |
|||
|
|||
// From UE4 - Used for Cloth |
|||
float Vis_Cloth(float NoV, float NoL) |
|||
{ |
|||
return 1/(4 * (NoL + NoV - NoL * NoV)); //RCP |
|||
} |
|||
|
|||
// ------------------------------------------------------------------ |
|||
// SORT THESE |
|||
|
|||
// Smith Joint GGX Anisotropic Visibility |
|||
// Taken from https://cedec.cesa.or.jp/2015/session/ENG/14698.html |
|||
float SmithJointGGXAnisotropic(float TdotV, float BdotV, float NdotV, float TdotL, float BdotL, float NdotL, float roughnessT, float roughnessB) |
|||
{ |
|||
float aT = roughnessT; |
|||
float aT2 = aT * aT; |
|||
float aB = roughnessB; |
|||
float aB2 = aB * aB; |
|||
|
|||
float lambdaV = NdotL * sqrt(aT2 * TdotV * TdotV + aB2 * BdotV * BdotV + NdotV * NdotV); |
|||
float lambdaL = NdotV * sqrt(aT2 * TdotL * TdotL + aB2 * BdotL * BdotL + NdotL * NdotL); |
|||
|
|||
return 0.5 / (lambdaV + lambdaL); |
|||
} |
|||
|
|||
// Convert Anistropy to roughness |
|||
void ConvertAnisotropyToRoughness(float roughness, float anisotropy, out float roughnessT, out float roughnessB) |
|||
{ |
|||
// (0 <= anisotropy <= 1), therefore (0 <= anisoAspect <= 1) |
|||
// The 0.9 factor limits the aspect ratio to 10:1. |
|||
float anisoAspect = sqrt(1.0 - 0.9 * anisotropy); |
|||
roughnessT = roughness / anisoAspect; // Distort along tangent (rougher) |
|||
roughnessB = roughness * anisoAspect; // Straighten along bitangent (smoother) |
|||
} |
|||
|
|||
// Schlick Fresnel |
|||
float FresnelSchlick(float f0, float f90, float u) |
|||
{ |
|||
float x = 1.0 - u; |
|||
float x5 = x * x; |
|||
x5 = x5 * x5 * x; |
|||
return (f90 - f0) * x5 + f0; // sub mul mul mul sub mad |
|||
} |
|||
|
|||
//Clamp roughness |
|||
float ClampRoughnessForAnalyticalLights(float roughness) |
|||
{ |
|||
return max(roughness, 0.000001); |
|||
} |
|||
|
|||
//Calculate tangent warp for IBL (Reference Version - not used) |
|||
float3 SpecularGGXIBLRef(float3 viewDir, float3 normalDir, float3 tangentDir, float3 bitangentDir, float roughnessT, float roughnessB) |
|||
{ |
|||
return float3(1, 1, 1); |
|||
//Hidden in UnityAnisotropicLighting.cginc |
|||
} |
|||
|
|||
// Sample Anisotropic Direction for IBL (Reference Version - not used) |
|||
void SampleAnisoGGXDir(float2 u, float3 viewDir, float3 normalDir, float3 tangent, float3 bitangent, float roughnessT, float roughnessB, out float3 halfDir, out float3 lightDir) |
|||
{ |
|||
// AnisoGGX NDF sampling |
|||
halfDir = sqrt(u.x / (1.0 - u.x)) * (roughnessT * cos((UNITY_PI * 2) * u.y) * tangent + roughnessB * sin((UNITY_PI * 2) * u.y) * bitangent) + normalDir; |
|||
halfDir = normalize(halfDir); |
|||
|
|||
// Convert sample from half angle to incident angle |
|||
lightDir = 2.0 * saturate(dot(viewDir, halfDir)) * halfDir - viewDir; |
|||
} |
|||
|
|||
// Ref: Donald Revie - Implementing Fur Using Deferred Shading (GPU Pro 2) |
|||
// The grain direction (e.g. hair or brush direction) is assumed to be orthogonal to the normal. |
|||
// The returned normal is NOT normalized. |
|||
float3 ComputeGrainNormal(float3 grainDir, float3 V) |
|||
{ |
|||
float3 B = cross(-V, grainDir); |
|||
return cross(B, grainDir); |
|||
} |
|||
|
|||
//Modify Normal for Anisotropic IBL (Realtime version) |
|||
// Fake anisotropic by distorting the normal. |
|||
// The grain direction (e.g. hair or brush direction) is assumed to be orthogonal to N. |
|||
// Anisotropic ratio (0->no isotropic; 1->full anisotropy in tangent direction) |
|||
float3 GetAnisotropicModifiedNormal(float3 grainDir, float3 N, float3 V, float anisotropy) |
|||
{ |
|||
float3 grainNormal = ComputeGrainNormal(grainDir, V); |
|||
// TODO: test whether normalizing 'grainNormal' is worth it. |
|||
return normalize(lerp(N, grainNormal, anisotropy)); |
|||
} |
|||
|
|||
/// REGION END - ANISOTROPY |
|||
|
|||
/// REGION START - SUBSURFACE SCATTERING |
|||
|
|||
half Fresnel(half3 H, half3 V, half F0) |
|||
{ |
|||
half base = 1.0 - dot(V, H); |
|||
half exponential = pow(base, 5.0); |
|||
return exponential + F0 * (1.0 - exponential); |
|||
} |
|||
/* |
|||
inline half3 KelemenSzirmayKalosSpecular(half3 normal, half3 lightDir, half3 viewDir, float roughness, float rho_s) |
|||
{ |
|||
half3 result = half3(0, 0, 0); |
|||
half NdotL = dot(normal, lightDir); |
|||
if (NdotL > 0.0) |
|||
{ |
|||
half3 h = lightDir + viewDir; |
|||
half3 H = normalize(h); |
|||
half NdotH = dot(normal, H); |
|||
half PH = pow(2.0 * tex2D(_BeckmannPrecomputedTex, half2(NdotH, roughness)).r, 10.0); |
|||
half F = Fresnel(H, viewDir, 0.028); |
|||
half frSpec = max(PH * F / dot(h, h), 0); |
|||
half term = NdotL * rho_s * frSpec; |
|||
result = half3(term, term, term); |
|||
} |
|||
return result; |
|||
}*/ |
|||
/* |
|||
half3 SkinDiffuse(float curv, float3 NdotL) |
|||
{ |
|||
float3 lookup = NdotL * 0.5 + 0.5; |
|||
float3 diffuse; |
|||
|
|||
diffuse.r = tex2D(_DiffusionProfileTexture, float2(lookup.r, curv)).r; |
|||
diffuse.g = tex2D(_DiffusionProfileTexture, float2(lookup.g, curv)).g; |
|||
diffuse.b = tex2D(_DiffusionProfileTexture, float2(lookup.b, curv)).b; |
|||
|
|||
return diffuse; |
|||
}*/ |
|||
|
|||
/// REGION END - SUBSURFACE SCATTERING |
|||
|
|||
// Upgrade NOTE: replaced 'defined SHADINGMODELID_CLEARCOAT' with 'defined (SHADINGMODELID_CLEARCOAT)' |
|||
// Upgrade NOTE: replaced 'defined SHADINGMODELID_CLOTH' with 'defined (SHADINGMODELID_CLOTH)' |
|||
// Upgrade NOTE: replaced 'defined SHADINGMODELID_EYE' with 'defined (SHADINGMODELID_EYE)' |
|||
// Upgrade NOTE: replaced 'defined SHADINGMODELID_FOLIAGE' with 'defined (SHADINGMODELID_FOLIAGE)' |
|||
// Upgrade NOTE: replaced 'defined SHADINGMODELID_HAIR' with 'defined (SHADINGMODELID_HAIR)' |
|||
// Upgrade NOTE: replaced 'defined SHADINGMODELID_SKIN' with 'defined (SHADINGMODELID_SKIN)' |
|||
// Upgrade NOTE: replaced 'defined SHADINGMODELID_SUBSURFACE' with 'defined (SHADINGMODELID_SUBSURFACE)' |
|||
Blend One Zero |
|||
|
|||
Pass { |
|||
CGPROGRAM |
|||
#pragma vertex vert |
|||
#pragma fragment frag |
|||
#include "UnityCG.cginc" |
|||
// ------------------------------------------------------------------ |
|||
// Shading models |
|||
//#pragma multi_compile SHADINGMODELID_UNLIT SHADINGMODELID_STANDARD SHADINGMODELID_SUBSURFACE SHADINGMODELID_SKIN SHADINGMODELID_FOLIAGE SHADINGMODELID_CLEARCOAT SHADINGMODELID_CLOTH SHADINGMODELID_EYE |
|||
float3 ReflectionProbe_4f8cb744_19c5_4a6e_9bc1_172200f2fa25_normalDir; |
|||
float Vector1_20d0d38d_52d0_4444_8ef4_da01a311590e_Uniform; |
|||
// ------------------------------------------------------------------ |
|||
// Input |
|||
half _ShadingModel; |
|||
struct v2f |
|||
{ |
|||
float4 pos : SV_POSITION; |
|||
float4 color : COLOR; |
|||
float3 worldNormal : TEXCOORD1; |
|||
sampler2D _AnisotropyMap; |
|||
half _Anisotropy; |
|||
sampler2D _TangentMap; |
|||
}; |
|||
half4 _TranslucentColor; |
|||
sampler2D _TranslucencyMap; |
|||
sampler2D _FuzzTex; |
|||
half3 _FuzzColor; |
|||
half _Cloth; |
|||
inline float unity_posterize_float (float input, float stepsize) |
|||
{ |
|||
return floor(input / stepsize) * stepsize; |
|||
} |
|||
sampler2D _IrisNormal; |
|||
sampler2D _IrisMask; |
|||
half _IrisDistance; |
|||
half _TDistortion; |
|||
half _TScale; |
|||
half _TAmbient; |
|||
half _TPower; |
|||
half _TAttenuation; |
|||
half _TransmissionOverallStrength; |
|||
v2f vert (appdata_full v) |
|||
{ |
|||
v2f o = (v2f)0; |
|||
o.pos = UnityObjectToClipPos(v.vertex);; |
|||
float3 worldPos = mul(unity_ObjectToWorld, v.vertex).xyz; |
|||
float3 viewDir = UnityWorldSpaceViewDir(worldPos); |
|||
float4 screenPos = ComputeScreenPos(UnityObjectToClipPos(v.vertex)); |
|||
float3 worldNormal = UnityObjectToWorldNormal(v.normal); |
|||
o.worldNormal = worldNormal; |
|||
// ------------------------------------------------------------------ |
|||
// Maths helpers |
|||
return o; |
|||
} |
|||
// Octahedron Normal Vectors |
|||
// [Cigolle 2014, "A Survey of Efficient Representations for Independent Unit Vectors"] |
|||
// Mean Max |
|||
// oct 8:8 0.33709 0.94424 |
|||
// snorm 8:8:8 0.17015 0.38588 |
|||
// oct 10:10 0.08380 0.23467 |
|||
// snorm 10:10:10 0.04228 0.09598 |
|||
// oct 12:12 0.02091 0.05874 |
|||
|
|||
float2 UnitVectorToOctahedron(float3 N) |
|||
{ |
|||
N.xy /= dot(float3(1,1,1), abs(N)); |
|||
if (N.z <= 0) |
|||
{ |
|||
N.xy = (1 - abs(N.yx)) * (N.xy >= 0 ? float2(1, 1) : float2(-1, -1)); |
|||
} |
|||
return N.xy; |
|||
} |
|||
|
|||
float3 OctahedronToUnitVector(float2 Oct) |
|||
{ |
|||
float3 N = float3(Oct, 1 - dot(float2(1,1), abs(Oct))); |
|||
if (N.z < 0) |
|||
{ |
|||
N.xy = (1 - abs(N.yx)) * (N.xy >= 0 ? float2(1, 1) : float2(-1, -1)); |
|||
} |
|||
return float3(1, 1, 1); |
|||
return normalize(N); |
|||
} |
|||
half4 frag (v2f IN) : COLOR |
|||
{ |
|||
float3 worldSpaceNormal = normalize(IN.worldNormal); |
|||
float3 ReflectionProbe_4f8cb744_19c5_4a6e_9bc1_172200f2fa25 = ShadeSH9(float4(worldSpaceNormal.xyz , 1)); |
|||
float4 Split_f630c862_c9a4_4765_b085_f9b01dd46061 = float4(ReflectionProbe_4f8cb744_19c5_4a6e_9bc1_172200f2fa25, 1.0); |
|||
float Posterize_f232fbec_5ce8_4ba5_8491_a7a66291d45f_Output = unity_posterize_float (Split_f630c862_c9a4_4765_b085_f9b01dd46061.r, Vector1_20d0d38d_52d0_4444_8ef4_da01a311590e_Uniform); |
|||
return half4(Posterize_f232fbec_5ce8_4ba5_8491_a7a66291d45f_Output, Posterize_f232fbec_5ce8_4ba5_8491_a7a66291d45f_Output, Posterize_f232fbec_5ce8_4ba5_8491_a7a66291d45f_Output, 1.0); |
|||
// ------------------------------------------------------------------ |
|||
// Surface helpers |
|||
|
|||
half Anisotropy(float2 uv) |
|||
{ |
|||
return tex2D(_AnisotropyMap, uv) * _Anisotropy; |
|||
} |
|||
|
|||
half3 Fuzz(float2 uv) |
|||
{ |
|||
return tex2D(_FuzzTex, uv) * _FuzzColor; |
|||
} |
|||
|
|||
half Cloth() |
|||
{ |
|||
return _Cloth; |
|||
} |
|||
|
|||
half4 Iris(float2 uv) |
|||
{ |
|||
float2 n = UnitVectorToOctahedron(normalize(UnpackNormal(tex2D(_IrisNormal, uv)).rgb)) * 0.5 + 0.5; |
|||
float m = saturate(tex2D(_IrisMask, uv).r); // Iris Mask |
|||
float d = saturate(_IrisDistance); // Iris Distance |
|||
return float4(n.x, n.y, m, d); |
|||
} |
|||
|
|||
half3 Translucency(float2 uv) |
|||
{ |
|||
return tex2D(_TranslucencyMap, uv).rgb * _TranslucentColor.rgb; |
|||
} |
|||
|
|||
// ------------------------------------------------------------------ |
|||
// Unlit Shading Function |
|||
|
|||
float4 UnlitShading(float3 diffColor) |
|||
{ |
|||
return half4(diffColor, 1); |
|||
} |
|||
|
|||
// ------------------------------------------------------------------ |
|||
// Standard Shading Function |
|||
|
|||
float4 StandardShading(float3 diffColor, float3 specColor, float oneMinusReflectivity, float smoothness, float3 normal, float3x3 worldVectors, |
|||
float anisotropy, float metallic, float3 viewDir, UnityLight light, UnityIndirect gi) |
|||
{ |
|||
//Unpack world vectors |
|||
float3 tangent = worldVectors[0]; |
|||
float3 bitangent = worldVectors[1]; |
|||
//Normal shift |
|||
float shiftAmount = dot(normal, viewDir); |
|||
normal = shiftAmount < 0.0f ? normal + viewDir * (-shiftAmount + 1e-5f) : normal; |
|||
//Regular vectors |
|||
float NdotL = saturate(dot(normal, light.dir)); //sat? |
|||
float NdotV = abs(dot(normal, viewDir)); //abs? |
|||
float LdotV = dot(light.dir, viewDir); |
|||
float3 H = Unity_SafeNormalize(light.dir + viewDir); |
|||
float invLenLV = rsqrt(abs(2 + 2 * normalize(LdotV))); |
|||
//float invLenLV = rsqrt(abs(2 + 2 * LdotV)); |
|||
//float NdotH = (NdotL + normalize(NdotV)) * invLenLV; |
|||
float NdotH = saturate(dot(normal, H)); |
|||
//float NdotH = saturate((NdotL + normalize(NdotV)) * invLenLV); |
|||
//float H = (light.dir + viewDir) * invLenLV; |
|||
float LdotH = saturate(dot(light.dir, H)); |
|||
//Tangent vectors |
|||
float TdotH = dot(tangent, H); |
|||
float TdotL = dot(tangent, light.dir); |
|||
float BdotH = dot(bitangent, H); |
|||
float BdotL = dot(bitangent, light.dir); |
|||
float TdotV = dot(viewDir, tangent); |
|||
float BdotV = dot(viewDir, bitangent); |
|||
//Fresnels |
|||
half grazingTerm = saturate(smoothness + (1 - oneMinusReflectivity)); |
|||
float3 F = FresnelLerp(specColor, grazingTerm, NdotV); //Original Schlick - Replace from SRP? |
|||
//float3 fresnel0 = lerp(specColor, diffColor, metallic); |
|||
//float3 F = FresnelSchlick(fresnel0, 1.0, LdotH); |
|||
//Calculate roughness |
|||
float roughnessT; |
|||
float roughnessB; |
|||
float perceptualRoughness = SmoothnessToPerceptualRoughness(smoothness); |
|||
float roughness = PerceptualRoughnessToRoughness(perceptualRoughness); |
|||
ConvertAnisotropyToRoughness(roughness, anisotropy, roughnessT, roughnessB); |
|||
//Clamp roughness |
|||
//roughness = ClampRoughnessForAnalyticalLights(roughness); |
|||
roughnessT = ClampRoughnessForAnalyticalLights(roughnessT); |
|||
roughnessB = ClampRoughnessForAnalyticalLights(roughnessB); |
|||
//Visibility & Distribution terms |
|||
float V = SmithJointGGXAnisotropic(TdotV, BdotV, NdotV, TdotL, BdotL, NdotL, roughnessT, roughnessB); |
|||
float D = D_GGXAnisotropic(TdotH, BdotH, NdotH, roughnessT, roughnessB); |
|||
//Specular term |
|||
float3 specularTerm = V * D; //*UNITY_PI; |
|||
# ifdef UNITY_COLORSPACE_GAMMA |
|||
specularTerm = sqrt(max(1e-4h, specularTerm)); |
|||
# endif |
|||
// specularTerm * nl can be NaN on Metal in some cases, use max() to make sure it's a sane value |
|||
specularTerm = max(0, specularTerm * NdotL); |
|||
#if defined(_SPECULARHIGHLIGHTS_OFF) |
|||
specularTerm = 0.0; |
|||
#endif |
|||
//Diffuse term |
|||
float diffuseTerm = DisneyDiffuse(NdotV, NdotL, LdotH, perceptualRoughness) * NdotL;// - Need this NdotL multiply? |
|||
//Reduction |
|||
half surfaceReduction; |
|||
# ifdef UNITY_COLORSPACE_GAMMA |
|||
surfaceReduction = 1.0 - 0.28*roughness*perceptualRoughness; // 1-0.28*x^3 as approximation for (1/(x^4+1))^(1/2.2) on the domain [0;1] |
|||
# else |
|||
surfaceReduction = 1.0 / (roughness*roughness + 1.0); // fade \in [0.5;1] |
|||
# endif |
|||
//Final |
|||
half3 color = (diffColor * (gi.diffuse + light.color * diffuseTerm)) |
|||
+ specularTerm * light.color * FresnelTerm(specColor, LdotH) |
|||
+ surfaceReduction * gi.specular * FresnelLerp(specColor, grazingTerm, NdotV); |
|||
return half4(color, 1); |
|||
} |
|||
|
|||
// ------------------------------------------------------------------ |
|||
// Cloth Shading Function |
|||
|
|||
//float3 ClothShading(FGBufferData GBuffer, float3 LobeRoughness, float3 LobeEnergy, float3 L, float3 V, half3 N) |
|||
float4 ClothShading(float3 diffColor, float3 specColor, float3 fuzzColor, float cloth, float oneMinusReflectivity, float smoothness, float3 normal, float3 viewDir, UnityLight light, UnityIndirect gi, float3x3 worldVectors, float anisotropy) |
|||
{ |
|||
const float3 FuzzColor = saturate(fuzzColor); |
|||
const float Cloth = saturate(cloth); |
|||
|
|||
//Regular vectors |
|||
float NdotL = saturate(dot(normal, light.dir)); //sat? |
|||
float NdotV = abs(dot(normal, viewDir)); //abs? |
|||
float LdotV = dot(light.dir, viewDir); |
|||
//float invLenLV = rsqrt(abs(2 + 2 * normalize(LdotV))); |
|||
////float invLenLV = rsqrt(abs(2 + 2 * LdotV)); |
|||
//float NdotH = (NdotL + normalize(NdotV)) * invLenLV; |
|||
//float NdotH = saturate((NdotL + normalize(NdotV)) * invLenLV); |
|||
float3 H = Unity_SafeNormalize(light.dir + viewDir); |
|||
//float H = (light.dir + viewDir) * invLenLV; |
|||
float LdotH = saturate(dot(light.dir, H)); |
|||
|
|||
//float3 H = normalize(viewDir + light.dir); |
|||
//float NdotL = saturate(dot(normal, light.dir)); |
|||
//float NdotV = saturate(abs(dot(normal, viewDir)) + 1e-5); |
|||
float NdotH = saturate(dot(normal, H)); |
|||
float VdotH = saturate(dot(viewDir, H)); |
|||
//float LdotH = saturate(dot(light.dir, H)); |
|||
|
|||
half grazingTerm = saturate(smoothness + (1 - oneMinusReflectivity)); |
|||
|
|||
// Diffuse |
|||
float perceptualRoughness = SmoothnessToPerceptualRoughness(smoothness); |
|||
float roughness = PerceptualRoughnessToRoughness(perceptualRoughness); |
|||
float diffuseTerm = DisneyDiffuse(NdotV, NdotL, LdotH, perceptualRoughness) * NdotL;// - Need this NdotL multiply? |
|||
|
|||
// Cloth - Asperity Scattering - Inverse Beckmann Layer |
|||
float3 F1 = FresnelTerm(fuzzColor, LdotH);// FresnelLerp(fuzzColor, grazingTerm, NdotV);// FresnelTerm(FuzzColor, LdotH);// F_Schlick(FuzzColor, VdotH); |
|||
float D1 = D_InvGGX(roughness, NdotH); |
|||
float V1 = Vis_Cloth(NdotV, NdotL); |
|||
//Specular term |
|||
float3 specularTerm1 = V1 * D1; //*UNITY_PI; |
|||
# ifdef UNITY_COLORSPACE_GAMMA |
|||
specularTerm1 = sqrt(max(1e-4h, specularTerm1)); |
|||
# endif |
|||
// specularTerm * nl can be NaN on Metal in some cases, use max() to make sure it's a sane value |
|||
// specularTerm1 = max(0, specularTerm1 * NdotL); |
|||
#if defined(_SPECULARHIGHLIGHTS_OFF) |
|||
specularTerm1 = 0.0; |
|||
#endif |
|||
float3 Spec1 = specularTerm1 * light.color * FresnelTerm(fuzzColor, LdotH); |
|||
|
|||
// Generalized microfacet specular |
|||
/*float3 F2 = F_Schlick(specColor, VdotH); |
|||
float D2 = D_GGX(roughness, NdotH); |
|||
float V2 = Vis_SmithJointApprox(roughness, NdotV, NdotL); |
|||
float3 Spec2 = D2 * V2 * F2 * light.color;*/ |
|||
|
|||
//Unpack world vectors |
|||
float3 tangent = worldVectors[0]; |
|||
float3 bitangent = worldVectors[1]; |
|||
//Tangent vectors |
|||
float TdotH = dot(tangent, H); |
|||
float TdotL = dot(tangent, light.dir); |
|||
float BdotH = dot(bitangent, H); |
|||
float BdotL = dot(bitangent, light.dir); |
|||
float TdotV = dot(viewDir, tangent); |
|||
float BdotV = dot(viewDir, bitangent); |
|||
//Fresnels |
|||
float3 F2 = FresnelLerp(specColor, grazingTerm, NdotV);// FresnelTerm(specColor, LdotH);// FresnelLerp(specColor, grazingTerm, NdotV); //Original Schlick - Replace from SRP? |
|||
float roughnessT; |
|||
float roughnessB; |
|||
//float perceptualRoughness = SmoothnessToPerceptualRoughness(smoothness); |
|||
//float roughness = PerceptualRoughnessToRoughness(perceptualRoughness); |
|||
ConvertAnisotropyToRoughness(roughness, anisotropy, roughnessT, roughnessB); |
|||
//Clamp roughness |
|||
//roughness = ClampRoughnessForAnalyticalLights(roughness); |
|||
roughnessT = ClampRoughnessForAnalyticalLights(roughnessT); |
|||
roughnessB = ClampRoughnessForAnalyticalLights(roughnessB); |
|||
//Visibility & Distribution terms |
|||
float V2 = SmithJointGGXAnisotropic(TdotV, BdotV, NdotV, TdotL, BdotL, NdotL, roughnessT, roughnessB); |
|||
float D2 = D_GGXAnisotropic(TdotH, BdotH, NdotH, roughnessT, roughnessB); |
|||
//Specular term |
|||
float3 specularTerm2 = V2 * D2; //*UNITY_PI; |
|||
# ifdef UNITY_COLORSPACE_GAMMA |
|||
specularTerm2 = sqrt(max(1e-4h, specularTerm2)); |
|||
# endif |
|||
// specularTerm * nl can be NaN on Metal in some cases, use max() to make sure it's a sane value |
|||
specularTerm2 = max(0, specularTerm2 * NdotL); |
|||
#if defined(_SPECULARHIGHLIGHTS_OFF) |
|||
specularTerm2 = 0.0; |
|||
#endif |
|||
float3 Spec2 = specularTerm2 * light.color * FresnelTerm(specColor, LdotH); |
|||
|
|||
float3 Spec = lerp(Spec2, Spec1, Cloth); |
|||
|
|||
//Reduction |
|||
half surfaceReduction; |
|||
# ifdef UNITY_COLORSPACE_GAMMA |
|||
surfaceReduction = 1.0 - 0.28*roughness*perceptualRoughness; // 1-0.28*x^3 as approximation for (1/(x^4+1))^(1/2.2) on the domain [0;1] |
|||
# else |
|||
surfaceReduction = 1.0 / (roughness*roughness + 1.0); // fade \in [0.5;1] |
|||
# endif |
|||
//Final |
|||
//half grazingTerm = saturate(smoothness + (1 - oneMinusReflectivity)); |
|||
half3 color = (diffColor * (gi.diffuse + light.color * diffuseTerm)) |
|||
+ Spec |
|||
+ surfaceReduction * gi.specular * FresnelLerp(specColor, grazingTerm, NdotV); |
|||
return half4(color, 1); |
|||
} |
|||
|
|||
// ------------------------------------------------------------------ |
|||
// Eye Shading Function |
|||
|
|||
//float3 EyeShading(FGBufferData GBuffer, float3 LobeRoughness, float3 LobeEnergy, float3 L, float3 V, half3 N) |
|||
float4 EyeShading(float3 diffColor, float3 specColor, float3 viewDir, half3 normal, float smoothness, float oneMinusReflectivity, UnityLight light, UnityIndirect gi) |
|||
{ |
|||
float3 H = normalize(viewDir + light.dir); |
|||
float NdotL = saturate(dot(normal, light.dir)); |
|||
float NdotV = saturate(abs(dot(normal, viewDir)) + 1e-5); |
|||
float NdotH = saturate(dot(normal, H)); |
|||
float VdotH = saturate(dot(viewDir, H)); |
|||
float LdotH = saturate(dot(light.dir, H)); |
|||
|
|||
// Generalized microfacet specular |
|||
float perceptualRoughness = SmoothnessToPerceptualRoughness(smoothness); |
|||
float roughness = PerceptualRoughnessToRoughness(perceptualRoughness); |
|||
|
|||
float D = D_GGX(roughness, NdotH);// *LobeEnergy[1]; |
|||
float V = Vis_SmithJointApprox(roughness, NdotV, NdotL); |
|||
float3 F = F_Schlick(specColor, VdotH); |
|||
|
|||
float3 specularTerm = V * D; //*UNITY_PI; |
|||
# ifdef UNITY_COLORSPACE_GAMMA |
|||
specularTerm = sqrt(max(1e-4h, specularTerm)); |
|||
# endif |
|||
// specularTerm * nl can be NaN on Metal in some cases, use max() to make sure it's a sane value |
|||
specularTerm = max(0, specularTerm * NdotL); |
|||
#if defined(_SPECULARHIGHLIGHTS_OFF) |
|||
specularTerm = 0.0; |
|||
#endif |
|||
half grazingTerm = saturate(smoothness + (1 - oneMinusReflectivity)); |
|||
half surfaceReduction; |
|||
# ifdef UNITY_COLORSPACE_GAMMA |
|||
surfaceReduction = 1.0 - 0.28*roughness*perceptualRoughness; // 1-0.28*x^3 as approximation for (1/(x^4+1))^(1/2.2) on the domain [0;1] |
|||
# else |
|||
surfaceReduction = 1.0 / (roughness*roughness + 1.0); // fade \in [0.5;1] |
|||
# endif |
|||
|
|||
float diffuseTerm = DisneyDiffuse(NdotV, NdotL, LdotH, perceptualRoughness) * NdotL; // TODO - Unreal does not apply diffuse in Shading function |
|||
//Final |
|||
half3 color = (diffColor * (gi.diffuse + light.color * diffuseTerm)) |
|||
+ specularTerm * light.color * FresnelTerm(specColor, LdotH) |
|||
+ surfaceReduction * gi.specular * FresnelLerp(specColor, grazingTerm, NdotV); |
|||
return half4(color, 1); |
|||
} |
|||
|
|||
// ------------------------------------------------------------------ |
|||
// Subsurface Shading Function |
|||
|
|||
float3 SubsurfaceShadingSimple(float3 diffColor, float3 normal, float3 viewDir, float3 thickness, UnityLight light) |
|||
{ |
|||
half3 vLTLight = light.dir + normal * _TDistortion; |
|||
half fLTDot = pow(saturate(dot(viewDir, -vLTLight)), _TPower) * _TScale; |
|||
half3 fLT = _TAttenuation * (fLTDot + _TAmbient) * (thickness); |
|||
return diffColor * ((light.color * fLT) * _TransmissionOverallStrength); |
|||
} |
|||
|
|||
// ------------------------------------------------------------------ |
|||
// Eye Subsurface Shading Function |
|||
|
|||
//float3 EyeSubsurfaceShading(FGBufferData GBuffer, float3 L, float3 V, half3 N) |
|||
float3 EyeSubsurfaceShading(float3 diffColor, float3 specColor, float3 viewDir, half3 normal, float smoothness, float4 iris, UnityLight light) |
|||
{ |
|||
float2 irisNormal = iris.rg; |
|||
float irisMask = iris.z; |
|||
float irisDistance = iris.w; |
|||
|
|||
float3 H = normalize(viewDir + light.dir); |
|||
float VdotH = saturate(dot(viewDir, H)); |
|||
float NdotV = saturate(abs(dot(normal, viewDir)) + 1e-5); |
|||
float LdotH = saturate(dot(light.dir, H)); |
|||
|
|||
// F_Schlick |
|||
//float F0 = GBuffer.Specular * 0.08; |
|||
//float Fc = Pow5(1 - VoH); |
|||
//float F = Fc + (1 - Fc) * F0; |
|||
float3 fresnel0 = lerp(specColor, diffColor, smoothness); |
|||
float3 F = FresnelSchlick(fresnel0, 1.0, LdotH); |
|||
|
|||
//float IrisDistance = GBuffer.CustomData.w; |
|||
//float IrisMask = GBuffer.CustomData.z; |
|||
|
|||
float3 IrisNormal; |
|||
IrisNormal = OctahedronToUnitVector(irisNormal * 2 - 1); |
|||
|
|||
// Blend in the negative intersection normal to create some concavity |
|||
// Not great as it ties the concavity to the convexity of the cornea surface |
|||
// No good justification for that. On the other hand, if we're just looking to |
|||
// introduce some concavity, this does the job. |
|||
float3 CausticNormal = normalize(lerp(IrisNormal, -normal, irisMask*irisDistance)); |
|||
|
|||
float NdotL = saturate(dot(IrisNormal, light.dir)); |
|||
float Power = lerp(12, 1, NdotL); |
|||
float Caustic = 0.6 + 0.2 * (Power + 1) * pow(saturate(dot(CausticNormal, light.dir)), Power); |
|||
float Iris = NdotL * Caustic; |
|||
|
|||
// http://blog.stevemcauley.com/2011/12/03/energy-conserving-wrapped-diffuse/ |
|||
float Wrap = 0.15; |
|||
float Sclera = saturate((dot(normal, light.dir) + Wrap) / (1 + Wrap) * (1 + Wrap)); |
|||
|
|||
return (1 - F) * lerp(Sclera, Iris, irisMask) * diffColor / UNITY_PI; |
|||
} |
|||
|
|||
// ------------------------------------------------------------------ |
|||
// Shading function selectors |
|||
|
|||
//float3 SurfaceShading(/*FGBufferData GBuffer,*/ float3 LobeRoughness, float3 LobeEnergy, float3 L, float3 V, half3 N, uint2 Random) |
|||
float4 SurfaceShading(float3 diffColor, float3 specColor, float oneMinusReflectivity, float smoothness, float3 normal, |
|||
float3x3 worldVectors, float anisotropy, float4 customData, float metallic, float3 viewDir, UnityLight light, UnityIndirect gi) |
|||
{ |
|||
#if defined(SHADINGMODELID_UNLIT) |
|||
{ |
|||
return UnlitShading(diffColor); |
|||
} |
|||
#elif defined(SHADINGMODELID_STANDARD) || defined(SHADINGMODELID_SUBSURFACE) || defined(SHADINGMODELID_SKIN) || defined(SHADINGMODELID_FOLIAGE) |
|||
{ |
|||
return StandardShading(diffColor, specColor, oneMinusReflectivity, smoothness, |
|||
normal, worldVectors, anisotropy, metallic, viewDir, light, gi); |
|||
} |
|||
#elif defined (SHADINGMODELID_CLEARCOAT) |
|||
{ |
|||
return float4(1, 1, 1, 1); //ClearCoatShading(GBuffer, LobeRoughness, LobeEnergy, L, V, N); |
|||
} |
|||
#elif defined (SHADINGMODELID_CLOTH) |
|||
{ |
|||
return ClothShading(diffColor, specColor, customData.rgb, customData.a, oneMinusReflectivity, smoothness, normal, viewDir, light, gi, worldVectors, anisotropy); |
|||
} |
|||
#elif defined (SHADINGMODELID_EYE) |
|||
{ |
|||
return EyeShading(diffColor, specColor, viewDir, normal, smoothness, oneMinusReflectivity, light, gi); //EyeShading(GBuffer, LobeRoughness, LobeEnergy, L, V, N); |
|||
} |
|||
#endif |
|||
return float4(0, 0, 0, 0); |
|||
} |
|||
|
|||
//float3 SubsurfaceShading(/*FGBufferData GBuffer,*/ float3 L, float3 V, half3 N, float Shadow, uint2 Random) |
|||
float3 SubsurfaceShading(float3 diffColor, float3 specColor, float3 normal, float smoothness, float3 viewDir, float4 customData, UnityLight light) |
|||
{ |
|||
#if defined (SHADINGMODELID_SUBSURFACE) |
|||
{ |
|||
return SubsurfaceShadingSimple(diffColor, normal, viewDir, customData.rgb, light); |
|||
} |
|||
#elif defined (SHADINGMODELID_SKIN) |
|||
{ |
|||
return float3(0, 0, 0); //SubsurfaceShadingPreintegratedSkin(GBuffer, L, V, N); |
|||
} |
|||
#elif defined (SHADINGMODELID_FOLIAGE) |
|||
{ |
|||
return float3(0, 0, 0); //SubsurfaceShadingTwoSided(SubsurfaceColor, L, V, N); |
|||
} |
|||
#elif defined (SHADINGMODELID_HAIR) |
|||
{ |
|||
return float3(0, 0, 0); //HairShading(GBuffer, L, V, N, Shadow, 1, 0, Random); |
|||
} |
|||
#elif defined (SHADINGMODELID_EYE) |
|||
{ |
|||
return EyeSubsurfaceShading(diffColor, specColor, viewDir, normal, smoothness, customData, light); //EyeSubsurfaceShading(GBuffer, L, V, N); |
|||
} |
|||
#endif |
|||
return float3(0, 0, 0); |
|||
} |
|||
|
|||
//#endif UNITY_ADVANCED_SHADINGMODELS_INCLUDED |
|||
|
|||
//------------------------------------------------------------------------------------- |
|||
// Lighting Helpers |
|||
|
|||
// Glossy Environment |
|||
half3 Unity_AnisotropicGlossyEnvironment(UNITY_ARGS_TEXCUBE(tex), half4 hdr, Unity_GlossyEnvironmentData glossIn, half anisotropy) //Reference IBL from HD Pipe (Add half3 L input and replace R) |
|||
{ |
|||
half perceptualRoughness = glossIn.roughness /* perceptualRoughness */; |
|||
|
|||
// TODO: CAUTION: remap from Morten may work only with offline convolution, see impact with runtime convolution! |
|||
// For now disabled |
|||
#if 0 |
|||
float m = PerceptualRoughnessToRoughness(perceptualRoughness); // m is the real roughness parameter |
|||
const float fEps = 1.192092896e-07F; // smallest such that 1.0+FLT_EPSILON != 1.0 (+1e-4h is NOT good here. is visibly very wrong) |
|||
float n = (2.0 / max(fEps, m*m)) - 2.0; // remap to spec power. See eq. 21 in --> https://dl.dropboxusercontent.com/u/55891920/papers/mm_brdf.pdf |
|||
|
|||
n /= 4; // remap from n_dot_h formulatino to n_dot_r. See section "Pre-convolved Cube Maps vs Path Tracers" --> https://s3.amazonaws.com/docs.knaldtech.com/knald/1.0.0/lys_power_drops.html |
|||
|
|||
perceptualRoughness = pow(2 / (n + 2), 0.25); // remap back to square root of real roughness (0.25 include both the sqrt root of the conversion and sqrt for going from roughness to perceptualRoughness) |
|||
#else |
|||
// MM: came up with a surprisingly close approximation to what the #if 0'ed out code above does. |
|||
perceptualRoughness = perceptualRoughness*(1.7 - 0.7*perceptualRoughness); |
|||
#endif |
|||
|
|||
|
|||
half mip = perceptualRoughnessToMipmapLevel(perceptualRoughness); |
|||
half3 R = glossIn.reflUVW;// -half3(anisotropy, 0, 0); |
|||
half4 rgbm = UNITY_SAMPLE_TEXCUBE_LOD(tex, R, mip); |
|||
|
|||
return DecodeHDR(rgbm, hdr); |
|||
} |
|||
|
|||
// Indirect Specular |
|||
inline half3 UnityGI_AnisotropicIndirectSpecular(UnityGIInput data, half occlusion, Unity_GlossyEnvironmentData glossIn, half anisotropy, half3x3 worldVectors) |
|||
{ |
|||
half3 specular; |
|||
float3 tangentX = worldVectors[0]; |
|||
float3 tangentY = worldVectors[1]; |
|||
float3 N = worldVectors[2]; |
|||
float3 V = data.worldViewDir; |
|||
float3 iblNormalWS = GetAnisotropicModifiedNormal(tangentY, N, V, anisotropy); |
|||
float3 iblR = reflect(-V, iblNormalWS); |
|||
|
|||
#ifdef UNITY_SPECCUBE_BOX_PROJECTION |
|||
// we will tweak reflUVW in glossIn directly (as we pass it to Unity_GlossyEnvironment twice for probe0 and probe1), so keep original to pass into BoxProjectedCubemapDirection |
|||
|
|||
half3 originalReflUVW = glossIn.reflUVW; |
|||
glossIn.reflUVW = BoxProjectedCubemapDirection(iblR, data.worldPos, data.probePosition[0], data.boxMin[0], data.boxMax[0]); |
|||
#endif |
|||
|
|||
#ifdef _GLOSSYREFLECTIONS_OFF |
|||
specular = unity_IndirectSpecColor.rgb; |
|||
#else |
|||
half3 env0 = Unity_AnisotropicGlossyEnvironment(UNITY_PASS_TEXCUBE(unity_SpecCube0), data.probeHDR[0], glossIn, anisotropy); |
|||
//half3 env0 = Unity_AnisotropicGlossyEnvironment(UNITY_PASS_TEXCUBE(unity_SpecCube0), data.probeHDR[0], glossIn, anisotropy, L); //Reference IBL from HD Pipe |
|||
#ifdef UNITY_SPECCUBE_BLENDING |
|||
const float kBlendFactor = 0.99999; |
|||
float blendLerp = data.boxMin[0].w; |
|||
UNITY_BRANCH |
|||
if (blendLerp < kBlendFactor) |
|||
{ |
|||
#ifdef UNITY_SPECCUBE_BOX_PROJECTION |
|||
glossIn.reflUVW = BoxProjectedCubemapDirection(iblR, data.worldPos, data.probePosition[1], data.boxMin[1], data.boxMax[1]); |
|||
#endif |
|||
half3 env1 = Unity_AnisotropicGlossyEnvironment(UNITY_PASS_TEXCUBE_SAMPLER(unity_SpecCube1, unity_SpecCube0), data.probeHDR[1], glossIn, anisotropy); |
|||
//half3 env1 = Unity_AnisotropicGlossyEnvironment(UNITY_PASS_TEXCUBE_SAMPLER(unity_SpecCube1, unity_SpecCube0), data.probeHDR[1], glossIn, anisotropy, L); //Reference IBL from HD Pipe |
|||
specular = lerp(env1, env0, blendLerp); |
|||
} |
|||
ENDCG |
|||
else |
|||
{ |
|||
specular = env0; |
|||
} |
|||
#else |
|||
specular = env0; |
|||
#endif |
|||
#endif |
|||
|
|||
return specular * occlusion;// *weightOverPdf; //Reference IBL from HD Pipe |
|||
//return specular * occlusion * weightOverPdf; //Reference IBL from HD Pipe |
|||
} |
|||
|
|||
// Global Illumination |
|||
inline UnityGI UnityAnisotropicGlobalIllumination(UnityGIInput data, half occlusion, half3 normalWorld, Unity_GlossyEnvironmentData glossIn, half anisotropy, half3x3 worldVectors) |
|||
{ |
|||
UnityGI o_gi = UnityGI_Base(data, occlusion, normalWorld); |
|||
o_gi.indirect.specular = UnityGI_AnisotropicIndirectSpecular(data, occlusion, glossIn, anisotropy, worldVectors); |
|||
return o_gi; |
|||
} |
|||
|
|||
//------------------------------------------------------------------------------------- |
|||
// Lighting Functions |
|||
|
|||
//Surface Description |
|||
struct SurfaceOutputAdvanced |
|||
{ |
|||
fixed3 Albedo; // base (diffuse or specular) color |
|||
fixed3 Normal; // tangent space normal, if written |
|||
half3 Emission; |
|||
half Metallic; // 0=non-metal, 1=metal |
|||
// Smoothness is the user facing name, it should be perceptual smoothness but user should not have to deal with it. |
|||
// Everywhere in the code you meet smoothness it is perceptual smoothness |
|||
half Smoothness; // 0=rough, 1=smooth |
|||
half Occlusion; // occlusion (default 1) |
|||
fixed Alpha; // alpha for transparencies |
|||
half3 Tangent; |
|||
half Anisotropy; |
|||
half4 CustomData; |
|||
float3x3 WorldVectors; |
|||
//half ShadingModel; |
|||
}; |
|||
|
|||
inline half4 LightingAdvanced(SurfaceOutputAdvanced s, half3 viewDir, UnityGI gi) |
|||
{ |
|||
s.Normal = normalize(s.Normal); |
|||
|
|||
half oneMinusReflectivity; |
|||
half3 specColor; |
|||
s.Albedo = DiffuseAndSpecularFromMetallic(s.Albedo, s.Metallic, /*out*/ specColor, /*out*/ oneMinusReflectivity); |
|||
|
|||
// shader relies on pre-multiply alpha-blend (_SrcBlend = One, _DstBlend = OneMinusSrcAlpha) |
|||
// this is necessary to handle transparency in physically correct way - only diffuse component gets affected by alpha |
|||
half outputAlpha; |
|||
s.Albedo = PreMultiplyAlpha(s.Albedo, s.Alpha, oneMinusReflectivity, /*out*/ outputAlpha); |
|||
|
|||
half4 c = SurfaceShading(s.Albedo, specColor, oneMinusReflectivity, s.Smoothness, s.Normal, s.WorldVectors, s.Anisotropy, s.CustomData, s.Metallic, viewDir, gi.light, gi.indirect); |
|||
c.rgb += SubsurfaceShading(s.Albedo, specColor, s.Normal, s.Smoothness, viewDir, s.CustomData, gi.light); |
|||
|
|||
//c.rgb += UNITY_BRDF_GI(s.Albedo, specColor, oneMinusReflectivity, s.Smoothness, s.Normal, viewDir, s.Occlusion, gi); |
|||
c.a = outputAlpha; |
|||
return c; |
|||
} |
|||
|
|||
//This is pointless as always forward? |
|||
inline half4 LightingAdvanced_Deferred(SurfaceOutputAdvanced s, half3 viewDir, UnityGI gi, out half4 outGBuffer0, out half4 outGBuffer1, out half4 outGBuffer2) |
|||
{ |
|||
half oneMinusReflectivity; |
|||
half3 specColor; |
|||
s.Albedo = DiffuseAndSpecularFromMetallic(s.Albedo, s.Metallic, /*out*/ specColor, /*out*/ oneMinusReflectivity); |
|||
|
|||
half4 c = SurfaceShading(s.Albedo, specColor, oneMinusReflectivity, s.Smoothness, s.Normal, s.WorldVectors, s.Anisotropy, s.CustomData, s.Metallic, viewDir, gi.light, gi.indirect); |
|||
c.rgb += SubsurfaceShading(s.Albedo, specColor, s.Normal, s.Smoothness, viewDir, s.CustomData, gi.light); |
|||
|
|||
UnityStandardData data; |
|||
data.diffuseColor = s.Albedo; |
|||
data.occlusion = s.Occlusion; |
|||
data.specularColor = specColor; |
|||
data.smoothness = s.Smoothness; |
|||
data.normalWorld = s.Normal; |
|||
|
|||
UnityStandardDataToGbuffer(data, outGBuffer0, outGBuffer1, outGBuffer2); |
|||
|
|||
half4 emission = half4(s.Emission + c.rgb, 1); |
|||
return emission; |
|||
} |
|||
|
|||
inline void LightingAdvanced_GI(SurfaceOutputAdvanced s, UnityGIInput data, inout UnityGI gi) |
|||
{ |
|||
#if defined(UNITY_PASS_DEFERRED) && UNITY_ENABLE_REFLECTION_BUFFERS |
|||
gi = UnityGlobalIllumination(data, s.Occlusion, s.Normal); |
|||
#else |
|||
Unity_GlossyEnvironmentData g = UnityGlossyEnvironmentSetup(s.Smoothness, data.worldViewDir, s.Normal, lerp(unity_ColorSpaceDielectricSpec.rgb, s.Albedo, s.Metallic)); |
|||
gi = UnityAnisotropicGlobalIllumination(data, s.Occlusion, s.Normal, g, s.Anisotropy, s.WorldVectors); |
|||
#endif |
|||
} |
|||
|
|||
|
|||
///END |
|||
|
|||
|
|||
#pragma target 5.0 |
|||
#pragma surface surf Advanced vertex:vert |
|||
#pragma glsl |
|||
#pragma debug |
|||
|
|||
|
|||
float4 Color_eb55295a_2a33_4a48_b612_9d279e2cf480_Uniform; |
|||
float Vector1_58a74627_6519_4fc6_ac27_ff4e37beadf7_Uniform; |
|||
|
|||
|
|||
struct Input |
|||
{ |
|||
float4 color : COLOR; |
|||
float4 worldTangent; |
|||
float3 worldNormal; |
|||
|
|||
}; |
|||
|
|||
void vert (inout appdata_full v, out Input o) |
|||
{ |
|||
UNITY_INITIALIZE_OUTPUT(Input,o); |
|||
o.worldTangent = float4(UnityObjectToWorldDir(v.tangent.xyz), v.tangent.w); |
|||
|
|||
|
|||
void surf (Input IN, inout SurfaceOutputAdvanced o) |
|||
{ |
|||
float3 worldSpaceTangent = normalize(IN.worldTangent.xyz); |
|||
float3 worldSpaceNormal = normalize(IN.worldNormal); |
|||
float3 worldSpaceBitangent = cross(worldSpaceNormal, worldSpaceTangent) * IN.worldTangent.w; |
|||
o.Albedo = Color_eb55295a_2a33_4a48_b612_9d279e2cf480_Uniform; |
|||
o.Metallic = Vector1_58a74627_6519_4fc6_ac27_ff4e37beadf7_Uniform; |
|||
o.Smoothness = Vector1_58a74627_6519_4fc6_ac27_ff4e37beadf7_Uniform; |
|||
o.Anisotropy = Vector1_58a74627_6519_4fc6_ac27_ff4e37beadf7_Uniform; |
|||
o.WorldVectors = float3x3(worldSpaceTangent, worldSpaceBitangent, worldSpaceNormal); |
|||
|
|||
} |
|||
ENDCG |
|||
} |
|||
|
|||
|
|||
FallBack "Diffuse" |
|||
} |
|||
Fallback Off |
|||
} |
|
|||
fileFormatVersion: 2 |
|||
guid: 9ab5e16c2083a4fe689209a8c1ae425e |
|||
timeCreated: 1495630928 |
|||
timeCreated: 1495643268 |
|||
defaultTextures: |
|||
- TextureAsset_ebbe75eb_728a_4e6c_b8a1_994df86c74ad_Uniform: {fileID: 2800000, guid: 225a31f233f5b82488f996901413908d, |
|||
type: 3} |
|||
nonModifiableTextures: |
|||
- Texture_94ba0aed_e579_4ba0_b677_86c6deda72a2_Uniform: {fileID: 2800000, guid: 9c50a18d04437449b86568cfcbb668a7, |
|||
type: 3} |
|||
- Texture_65e72eb9_bdc7_4c17_b514_379aaeefd7ca_Uniform: {fileID: 2800000, guid: 84462bdfeee9d694bbebf34e5f3faa74, |
|||
type: 3} |
|||
defaultTextures: [] |
|||
nonModifiableTextures: [] |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
998
MaterialGraphProject/Assets/Andre/Scenes/EmissionTest/LightingData.asset
文件差异内容过多而无法显示
查看文件
文件差异内容过多而无法显示
查看文件
|
|||
fileFormatVersion: 2 |
|||
guid: 7d10d324ed0f94cb09a5c4478eee9945 |
|||
folderAsset: yes |
|||
timeCreated: 1495628966 |
|||
licenseType: Pro |
|||
DefaultImporter: |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
fileFormatVersion: 2 |
|||
guid: 9d0a876dd165a46c6b30eac1bbbef3a7 |
|||
folderAsset: yes |
|||
timeCreated: 1495628893 |
|||
licenseType: Pro |
|||
DefaultImporter: |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
fileFormatVersion: 2 |
|||
guid: 788be86d1d83c4b5596351884aa015a9 |
|||
folderAsset: yes |
|||
timeCreated: 1495628982 |
|||
licenseType: Pro |
|||
DefaultImporter: |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
fileFormatVersion: 2 |
|||
guid: 1a53c91de66c7460fb9b67844e09076d |
|||
folderAsset: yes |
|||
timeCreated: 1495628928 |
|||
licenseType: Pro |
|||
DefaultImporter: |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
fileFormatVersion: 2 |
|||
guid: 2eded065f6ee74c53a9261b91dc002ff |
|||
folderAsset: yes |
|||
timeCreated: 1495628909 |
|||
licenseType: Pro |
|||
DefaultImporter: |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
%YAML 1.1 |
|||
%TAG !u! tag:unity3d.com,2011: |
|||
--- !u!21 &2100000 |
|||
Material: |
|||
serializedVersion: 6 |
|||
m_ObjectHideFlags: 0 |
|||
m_PrefabParentObject: {fileID: 0} |
|||
m_PrefabInternal: {fileID: 0} |
|||
m_Name: Blue |
|||
m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} |
|||
m_ShaderKeywords: |
|||
m_LightmapFlags: 4 |
|||
m_EnableInstancingVariants: 0 |
|||
m_CustomRenderQueue: -1 |
|||
stringTagMap: {} |
|||
disabledShaderPasses: [] |
|||
m_SavedProperties: |
|||
serializedVersion: 3 |
|||
m_TexEnvs: |
|||
- _BumpMap: |
|||
m_Texture: {fileID: 0} |
|||
m_Scale: {x: 1, y: 1} |
|||
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: 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} |
|||
- _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} |
|||
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 |
|||
- _SmoothnessTextureChannel: 0 |
|||
- _SpecularHighlights: 1 |
|||
- _SrcBlend: 1 |
|||
- _UVSec: 0 |
|||
- _ZWrite: 1 |
|||
m_Colors: |
|||
- _Color: {r: 0.384, g: 0.5156965, b: 1, a: 1} |
|||
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1} |
|
|||
fileFormatVersion: 2 |
|||
guid: 427b887a8c47842559f45a58c0d5efef |
|||
timeCreated: 1495632763 |
|||
licenseType: Pro |
|||
NativeFormatImporter: |
|||
mainObjectFileID: 2100000 |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
fileFormatVersion: 2 |
|||
guid: ce2b7cefae93b4cbd9ecfbd1a5b11716 |
|||
folderAsset: yes |
|||
timeCreated: 1495614557 |
|||
licenseType: Pro |
|||
DefaultImporter: |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
Shader "Custom/NewSurfaceShader" { |
|||
Properties { |
|||
_Color ("Color", Color) = (1,1,1,1) |
|||
_MainTex ("Albedo (RGB)", 2D) = "white" {} |
|||
_Glossiness ("Smoothness", Range(0,1)) = 0.5 |
|||
_Metallic ("Metallic", Range(0,1)) = 0.0 |
|||
} |
|||
SubShader { |
|||
Tags { "RenderType"="Opaque" } |
|||
LOD 200 |
|||
|
|||
CGPROGRAM |
|||
// Physically based Standard lighting model, and enable shadows on all light types |
|||
#pragma surface surf Standard fullforwardshadows |
|||
|
|||
// Use shader model 3.0 target, to get nicer looking lighting |
|||
#pragma target 3.0 |
|||
|
|||
sampler2D _MainTex; |
|||
|
|||
struct Input { |
|||
float2 uv_MainTex; |
|||
}; |
|||
|
|||
half _Glossiness; |
|||
half _Metallic; |
|||
fixed4 _Color; |
|||
|
|||
// Add instancing support for this shader. You need to check 'Enable Instancing' on materials that use the shader. |
|||
// See https://docs.unity3d.com/Manual/GPUInstancing.html for more information about instancing. |
|||
// #pragma instancing_options assumeuniformscaling |
|||
UNITY_INSTANCING_CBUFFER_START(Props) |
|||
// put more per-instance properties here |
|||
UNITY_INSTANCING_CBUFFER_END |
|||
|
|||
void surf (Input IN, inout SurfaceOutputStandard o) { |
|||
// Albedo comes from a texture tinted by color |
|||
fixed4 c = tex2D (_MainTex, IN.uv_MainTex) * _Color; |
|||
o.Albedo = c.rgb; |
|||
o.Emission = _Color.rgb; |
|||
// Metallic and smoothness come from slider variables |
|||
o.Metallic = _Metallic; |
|||
o.Smoothness = _Glossiness; |
|||
o.Alpha = c.a; |
|||
} |
|||
ENDCG |
|||
} |
|||
FallBack "Diffuse" |
|||
//CustomEditor "LegacyIlluminShaderGUI" |
|||
} |
|
|||
fileFormatVersion: 2 |
|||
guid: 59b99e4e9466b4038b124d9919069ff4 |
|||
timeCreated: 1495614693 |
|||
licenseType: Pro |
|||
ShaderImporter: |
|||
defaultTextures: [] |
|||
nonModifiableTextures: [] |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
%YAML 1.1 |
|||
%TAG !u! tag:unity3d.com,2011: |
|||
--- !u!21 &2100000 |
|||
Material: |
|||
serializedVersion: 6 |
|||
m_ObjectHideFlags: 0 |
|||
m_PrefabParentObject: {fileID: 0} |
|||
m_PrefabInternal: {fileID: 0} |
|||
m_Name: defaultSurface |
|||
m_Shader: {fileID: 4800000, guid: 59b99e4e9466b4038b124d9919069ff4, type: 3} |
|||
m_ShaderKeywords: |
|||
m_LightmapFlags: 1 |
|||
m_EnableInstancingVariants: 0 |
|||
m_CustomRenderQueue: -1 |
|||
stringTagMap: {} |
|||
disabledShaderPasses: [] |
|||
m_SavedProperties: |
|||
serializedVersion: 3 |
|||
m_TexEnvs: |
|||
- _BumpMap: |
|||
m_Texture: {fileID: 0} |
|||
m_Scale: {x: 1, y: 1} |
|||
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: 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} |
|||
- _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} |
|||
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 |
|||
- _SmoothnessTextureChannel: 0 |
|||
- _SpecularHighlights: 1 |
|||
- _SrcBlend: 1 |
|||
- _UVSec: 0 |
|||
- _ZWrite: 1 |
|||
m_Colors: |
|||
- _Color: {r: 1, g: 0, b: 0, a: 1} |
|||
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1} |
|
|||
fileFormatVersion: 2 |
|||
guid: efb1a8dbe3a9d4676947f12ddb8414e2 |
|||
timeCreated: 1495614678 |
|||
licenseType: Pro |
|||
NativeFormatImporter: |
|||
mainObjectFileID: 2100000 |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
%YAML 1.1 |
|||
%TAG !u! tag:unity3d.com,2011: |
|||
--- !u!21 &2100000 |
|||
Material: |
|||
serializedVersion: 6 |
|||
m_ObjectHideFlags: 0 |
|||
m_PrefabParentObject: {fileID: 0} |
|||
m_PrefabInternal: {fileID: 0} |
|||
m_Name: graph |
|||
m_Shader: {fileID: 4800000, guid: 9ab5e16c2083a4fe689209a8c1ae425e, type: 3} |
|||
m_ShaderKeywords: |
|||
m_LightmapFlags: 1 |
|||
m_EnableInstancingVariants: 0 |
|||
m_CustomRenderQueue: -1 |
|||
stringTagMap: {} |
|||
disabledShaderPasses: [] |
|||
m_SavedProperties: |
|||
serializedVersion: 3 |
|||
m_TexEnvs: |
|||
- Texture_73d7755c_9da7_46d2_90c6_35c2a880d380_Uniform: |
|||
m_Texture: {fileID: 0} |
|||
m_Scale: {x: 1, y: 1} |
|||
m_Offset: {x: 0, y: 0} |
|||
- Texture_8304e17f_0ca3_45b8_9081_4e083e4ffba7_Uniform: |
|||
m_Texture: {fileID: 0} |
|||
m_Scale: {x: 1, y: 1} |
|||
m_Offset: {x: 0, y: 0} |
|||
- Texture_aa489395_d5b1_4bce_a08c_71ce4329894d_Uniform: |
|||
m_Texture: {fileID: 0} |
|||
m_Scale: {x: 1, y: 1} |
|||
m_Offset: {x: 0, y: 0} |
|||
- Texture_d6d1ed65_5575_444c_8f92_38740ace2353_Uniform: |
|||
m_Texture: {fileID: 0} |
|||
m_Scale: {x: 1, y: 1} |
|||
m_Offset: {x: 0, y: 0} |
|||
- Texture_f6eb7ab6_0df6_4d1f_a833_847f9eefa1ce_Uniform: |
|||
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} |
|||
- _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: 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} |
|||
- _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} |
|||
m_Floats: |
|||
- Vector1_48a064e9_29c4_4cdd_8bf7_34902bb50605_Uniform: 1 |
|||
- _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 |
|||
- _SmoothnessTextureChannel: 0 |
|||
- _SpecularHighlights: 1 |
|||
- _SrcBlend: 1 |
|||
- _UVSec: 0 |
|||
- _ZWrite: 1 |
|||
m_Colors: |
|||
- _Color: {r: 1, g: 1, b: 1, a: 1} |
|||
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1} |
|
|||
fileFormatVersion: 2 |
|||
guid: 348ddedbff8cf4f6a9ba7d3e838621e7 |
|||
timeCreated: 1495614624 |
|||
licenseType: Pro |
|||
NativeFormatImporter: |
|||
mainObjectFileID: 2100000 |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
%YAML 1.1 |
|||
%TAG !u! tag:unity3d.com,2011: |
|||
--- !u!21 &2100000 |
|||
Material: |
|||
serializedVersion: 6 |
|||
m_ObjectHideFlags: 0 |
|||
m_PrefabParentObject: {fileID: 0} |
|||
m_PrefabInternal: {fileID: 0} |
|||
m_Name: std |
|||
m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} |
|||
m_ShaderKeywords: _EMISSION |
|||
m_LightmapFlags: 1 |
|||
m_EnableInstancingVariants: 0 |
|||
m_CustomRenderQueue: -1 |
|||
stringTagMap: {} |
|||
disabledShaderPasses: [] |
|||
m_SavedProperties: |
|||
serializedVersion: 3 |
|||
m_TexEnvs: |
|||
- _BumpMap: |
|||
m_Texture: {fileID: 0} |
|||
m_Scale: {x: 1, y: 1} |
|||
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: 69689f06d0a74fd42b0ef31038efadbf, type: 3} |
|||
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} |
|||
- _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} |
|||
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 |
|||
- _SmoothnessTextureChannel: 0 |
|||
- _SpecularHighlights: 1 |
|||
- _SrcBlend: 1 |
|||
- _UVSec: 0 |
|||
- _ZWrite: 1 |
|||
m_Colors: |
|||
- _Color: {r: 1, g: 1, b: 1, a: 1} |
|||
- _EmissionColor: {r: 1, g: 0, b: 0, a: 1} |
|
|||
fileFormatVersion: 2 |
|||
guid: 0c5f1acf89dc1457385f5fff2da6ff92 |
|||
timeCreated: 1495614597 |
|||
licenseType: Pro |
|||
NativeFormatImporter: |
|||
mainObjectFileID: 2100000 |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
%YAML 1.1 |
|||
%TAG !u! tag:unity3d.com,2011: |
|||
--- !u!21 &2100000 |
|||
Material: |
|||
serializedVersion: 6 |
|||
m_ObjectHideFlags: 0 |
|||
m_PrefabParentObject: {fileID: 0} |
|||
m_PrefabInternal: {fileID: 0} |
|||
m_Name: Green |
|||
m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} |
|||
m_ShaderKeywords: |
|||
m_LightmapFlags: 4 |
|||
m_EnableInstancingVariants: 0 |
|||
m_CustomRenderQueue: -1 |
|||
stringTagMap: {} |
|||
disabledShaderPasses: [] |
|||
m_SavedProperties: |
|||
serializedVersion: 3 |
|||
m_TexEnvs: |
|||
- _BumpMap: |
|||
m_Texture: {fileID: 0} |
|||
m_Scale: {x: 1, y: 1} |
|||
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: 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} |
|||
- _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} |
|||
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 |
|||
- _SmoothnessTextureChannel: 0 |
|||
- _SpecularHighlights: 1 |
|||
- _SrcBlend: 1 |
|||
- _UVSec: 0 |
|||
- _ZWrite: 1 |
|||
m_Colors: |
|||
- _Color: {r: 0.11353805, g: 0.5147059, b: 0.24910507, a: 1} |
|||
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1} |
|
|||
fileFormatVersion: 2 |
|||
guid: 1ee4dc2c5bfcf43cc97b29a7c4699efb |
|||
timeCreated: 1495632773 |
|||
licenseType: Pro |
|||
NativeFormatImporter: |
|||
mainObjectFileID: 2100000 |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
%YAML 1.1 |
|||
%TAG !u! tag:unity3d.com,2011: |
|||
--- !u!21 &2100000 |
|||
Material: |
|||
serializedVersion: 6 |
|||
m_ObjectHideFlags: 0 |
|||
m_PrefabParentObject: {fileID: 0} |
|||
m_PrefabInternal: {fileID: 0} |
|||
m_Name: Red |
|||
m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} |
|||
m_ShaderKeywords: |
|||
m_LightmapFlags: 4 |
|||
m_EnableInstancingVariants: 0 |
|||
m_CustomRenderQueue: -1 |
|||
stringTagMap: {} |
|||
disabledShaderPasses: [] |
|||
m_SavedProperties: |
|||
serializedVersion: 3 |
|||
m_TexEnvs: |
|||
- _BumpMap: |
|||
m_Texture: {fileID: 0} |
|||
m_Scale: {x: 1, y: 1} |
|||
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: 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} |
|||
- _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} |
|||
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 |
|||
- _SmoothnessTextureChannel: 0 |
|||
- _SpecularHighlights: 1 |
|||
- _SrcBlend: 1 |
|||
- _UVSec: 0 |
|||
- _ZWrite: 1 |
|||
m_Colors: |
|||
- _Color: {r: 0.8897059, g: 0.026167845, b: 0.026167845, a: 1} |
|||
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1} |
|
|||
fileFormatVersion: 2 |
|||
guid: 8e47b86405b234c41a54b03a51e6f8bf |
|||
timeCreated: 1495632767 |
|||
licenseType: Pro |
|||
NativeFormatImporter: |
|||
mainObjectFileID: 2100000 |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
%YAML 1.1 |
|||
%TAG !u! tag:unity3d.com,2011: |
|||
--- !u!21 &2100000 |
|||
Material: |
|||
serializedVersion: 6 |
|||
m_ObjectHideFlags: 0 |
|||
m_PrefabParentObject: {fileID: 0} |
|||
m_PrefabInternal: {fileID: 0} |
|||
m_Name: ShinyMat |
|||
m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} |
|||
m_ShaderKeywords: |
|||
m_LightmapFlags: 4 |
|||
m_EnableInstancingVariants: 0 |
|||
m_CustomRenderQueue: -1 |
|||
stringTagMap: {} |
|||
disabledShaderPasses: [] |
|||
m_SavedProperties: |
|||
serializedVersion: 3 |
|||
m_TexEnvs: |
|||
- _BumpMap: |
|||
m_Texture: {fileID: 0} |
|||
m_Scale: {x: 1, y: 1} |
|||
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: 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} |
|||
- _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} |
|||
m_Floats: |
|||
- _BumpScale: 1 |
|||
- _Cutoff: 0.5 |
|||
- _DetailNormalMapScale: 1 |
|||
- _DstBlend: 0 |
|||
- _GlossMapScale: 1 |
|||
- _Glossiness: 1 |
|||
- _GlossyReflections: 1 |
|||
- _Metallic: 1 |
|||
- _Mode: 0 |
|||
- _OcclusionStrength: 1 |
|||
- _Parallax: 0.02 |
|||
- _SmoothnessTextureChannel: 0 |
|||
- _SpecularHighlights: 1 |
|||
- _SrcBlend: 1 |
|||
- _UVSec: 0 |
|||
- _ZWrite: 1 |
|||
m_Colors: |
|||
- _Color: {r: 1, g: 1, b: 1, a: 1} |
|||
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1} |
|
|||
fileFormatVersion: 2 |
|||
guid: 74025bdead2bb408da915e2b5709244f |
|||
timeCreated: 1495633144 |
|||
licenseType: Pro |
|||
NativeFormatImporter: |
|||
mainObjectFileID: 2100000 |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Linq; |
|||
#if UNITY_EDITOR
|
|||
using UnityEditor; |
|||
#endif
|
|||
using UnityEngine.Graphing; |
|||
|
|||
namespace UnityEngine.MaterialGraph |
|||
{ |
|||
[Title("Input/Scene Data/Light Probe")] |
|||
public class LightProbeNode : AbstractMaterialNode, IGeneratesBodyCode, IMayRequireNormal |
|||
{ |
|||
protected const string kUVSlotName = "Normal"; |
|||
protected const string kOutputSlotRGBAName = "RGBA"; |
|||
|
|||
public const int NormalSlot = 0; |
|||
public const int OutputSlotRgbaId = 1; |
|||
|
|||
public override bool hasPreview { get { return false; } } |
|||
|
|||
public LightProbeNode() |
|||
{ |
|||
name = "LightProbe"; |
|||
UpdateNodeAfterDeserialization(); |
|||
} |
|||
|
|||
public sealed override void UpdateNodeAfterDeserialization() |
|||
{ |
|||
AddSlot(new MaterialSlot(OutputSlotRgbaId, kOutputSlotRGBAName, kOutputSlotRGBAName, SlotType.Output, SlotValueType.Vector3, Vector3.zero)); |
|||
AddSlot(new MaterialSlot(NormalSlot, kUVSlotName, kUVSlotName, SlotType.Input, SlotValueType.Vector3, Vector3.zero, false)); |
|||
RemoveSlotsNameNotMatching(validSlots); |
|||
} |
|||
|
|||
public override PreviewMode previewMode { |
|||
get { |
|||
return PreviewMode.Preview3D; |
|||
} |
|||
} |
|||
|
|||
protected int[] validSlots |
|||
{ |
|||
get { return new[] {OutputSlotRgbaId, NormalSlot}; } |
|||
} |
|||
|
|||
// Node generations
|
|||
public virtual void GenerateNodeCode(ShaderGenerator visitor, GenerationMode generationMode) |
|||
{ |
|||
var normalSlot = FindInputSlot<MaterialSlot>(NormalSlot); |
|||
if (normalSlot == null) |
|||
return; |
|||
|
|||
var normalName = "worldSpaceNormal"; |
|||
var edgesNorm = owner.GetEdges(normalSlot.slotReference).ToList(); |
|||
|
|||
|
|||
if (edgesNorm.Count > 0) |
|||
{ |
|||
var edge = edgesNorm[0]; |
|||
var fromNode = owner.GetNodeFromGuid<AbstractMaterialNode>(edge.outputSlot.nodeGuid); |
|||
normalName = ShaderGenerator.AdaptNodeOutput(fromNode, edge.outputSlot.slotId, ConcreteSlotValueType.Vector3, true); |
|||
} |
|||
//float3 shl = ShadeSH9(float4(worldNormal,1));
|
|||
string body = "ShadeSH9(float4(" + normalName + ".xyz , 1))"; |
|||
visitor.AddShaderChunk(precision + "3 " + GetVariableNameForNode() + " = " + body + ";", true); |
|||
} |
|||
|
|||
public override string GetVariableNameForSlot(int slotId) |
|||
{ |
|||
string slotOutput; |
|||
switch (slotId) |
|||
{ |
|||
case NormalSlot: |
|||
slotOutput = "_normalDir"; |
|||
break; |
|||
default: |
|||
slotOutput = ""; |
|||
break; |
|||
} |
|||
return GetVariableNameForNode() + slotOutput; |
|||
} |
|||
|
|||
public bool RequiresViewDirection() |
|||
{ |
|||
return true; |
|||
} |
|||
|
|||
public bool RequiresNormal() |
|||
{ |
|||
return true; |
|||
} |
|||
} |
|||
} |
|
|||
fileFormatVersion: 2 |
|||
guid: 5f77cdea8b1204b12bb03da3dd3bd3b6 |
|||
timeCreated: 1495482070 |
|||
licenseType: Pro |
|||
MonoImporter: |
|||
serializedVersion: 2 |
|||
defaultReferences: [] |
|||
executionOrder: 0 |
|||
icon: {instanceID: 0} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Linq; |
|||
#if UNITY_EDITOR
|
|||
using UnityEditor; |
|||
#endif
|
|||
using UnityEngine.Graphing; |
|||
|
|||
namespace UnityEngine.MaterialGraph |
|||
{ |
|||
[Title("Input/Scene Data/Reflection Probe")] |
|||
public class ReflectionProbeNode : AbstractMaterialNode, IGeneratesBodyCode, IMayRequireViewDirection, IMayRequireNormal |
|||
{ |
|||
protected const string kUVSlotName = "RefVector"; |
|||
protected const string kOutputSlotRGBAName = "RGBA"; |
|||
protected const string kInputSlotLodName = "MipLevel"; |
|||
|
|||
public const int NormalSlot = 0; |
|||
public const int InputSlotLod = 2; |
|||
public const int OutputSlotRgbaId = 1; |
|||
|
|||
public override bool hasPreview { get { return true; } } |
|||
|
|||
public ReflectionProbeNode() |
|||
{ |
|||
name = "ReflectionProbe"; |
|||
UpdateNodeAfterDeserialization(); |
|||
} |
|||
|
|||
public sealed override void UpdateNodeAfterDeserialization() |
|||
{ |
|||
AddSlot(new MaterialSlot(OutputSlotRgbaId, kOutputSlotRGBAName, kOutputSlotRGBAName, SlotType.Output, SlotValueType.Vector4, Vector4.zero)); |
|||
AddSlot(new MaterialSlot(NormalSlot, kUVSlotName, kUVSlotName, SlotType.Input, SlotValueType.Vector3, Vector3.zero, false)); |
|||
AddSlot (new MaterialSlot(InputSlotLod, kInputSlotLodName, kInputSlotLodName, SlotType.Input, SlotValueType.Vector1, Vector2.zero)); |
|||
RemoveSlotsNameNotMatching(validSlots); |
|||
} |
|||
|
|||
public override PreviewMode previewMode { |
|||
get { |
|||
return PreviewMode.Preview3D; |
|||
} |
|||
} |
|||
|
|||
protected int[] validSlots |
|||
{ |
|||
get { return new[] {OutputSlotRgbaId, NormalSlot, InputSlotLod}; } |
|||
} |
|||
|
|||
// Node generations
|
|||
public virtual void GenerateNodeCode(ShaderGenerator visitor, GenerationMode generationMode) |
|||
{ |
|||
var uvSlot = FindInputSlot<MaterialSlot>(NormalSlot); |
|||
if (uvSlot == null) |
|||
return; |
|||
|
|||
var lodID = FindInputSlot<MaterialSlot>(InputSlotLod); |
|||
if (lodID == null) |
|||
return; |
|||
|
|||
var uvName = "reflect(-worldSpaceViewDirection, worldSpaceNormal)"; |
|||
var lodValue = lodID.currentValue.x.ToString (); |
|||
var edgesUV = owner.GetEdges(uvSlot.slotReference).ToList(); |
|||
var edgesLOD = owner.GetEdges (lodID.slotReference).ToList (); |
|||
|
|||
|
|||
if (edgesUV.Count > 0) |
|||
{ |
|||
var edge = edgesUV[0]; |
|||
var fromNode = owner.GetNodeFromGuid<AbstractMaterialNode>(edge.outputSlot.nodeGuid); |
|||
uvName = ShaderGenerator.AdaptNodeOutput(fromNode, edge.outputSlot.slotId, ConcreteSlotValueType.Vector3, true); |
|||
} |
|||
|
|||
if (edgesLOD.Count > 0) |
|||
{ |
|||
var edge = edgesLOD[0]; |
|||
var fromNode = owner.GetNodeFromGuid<AbstractMaterialNode>(edge.outputSlot.nodeGuid); |
|||
lodValue = GetSlotValue (edge.inputSlot.slotId, GenerationMode.ForReals); |
|||
} |
|||
|
|||
string body = "DecodeHDR(UNITY_SAMPLE_TEXCUBE_LOD(unity_SpecCube0, " + uvName + ".xyz ," + lodValue + "), unity_SpecCube0_HDR)"; |
|||
visitor.AddShaderChunk(precision + "3 " + GetVariableNameForNode() + " = " + body + ";", true); |
|||
} |
|||
|
|||
public override string GetVariableNameForSlot(int slotId) |
|||
{ |
|||
string slotOutput; |
|||
switch (slotId) |
|||
{ |
|||
case InputSlotLod: |
|||
slotOutput = "_lod"; |
|||
break; |
|||
case NormalSlot: |
|||
slotOutput = "_refDir"; |
|||
break; |
|||
default: |
|||
slotOutput = ""; |
|||
break; |
|||
} |
|||
return GetVariableNameForNode() + slotOutput; |
|||
} |
|||
|
|||
public bool RequiresViewDirection() |
|||
{ |
|||
return true; |
|||
} |
|||
|
|||
public bool RequiresNormal() |
|||
{ |
|||
return true; |
|||
} |
|||
} |
|||
} |
|
|||
fileFormatVersion: 2 |
|||
guid: fb8845c10261f47d0a719ac80481e667 |
|||
timeCreated: 1495482070 |
|||
licenseType: Pro |
|||
MonoImporter: |
|||
serializedVersion: 2 |
|||
defaultReferences: [] |
|||
executionOrder: 0 |
|||
icon: {instanceID: 0} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
%YAML 1.1 |
|||
%TAG !u! tag:unity3d.com,2011: |
|||
--- !u!29 &1 |
|||
OcclusionCullingSettings: |
|||
m_ObjectHideFlags: 0 |
|||
serializedVersion: 2 |
|||
m_OcclusionBakeSettings: |
|||
smallestOccluder: 5 |
|||
smallestHole: 0.25 |
|||
backfaceThreshold: 100 |
|||
m_SceneGUID: 00000000000000000000000000000000 |
|||
m_OcclusionCullingData: {fileID: 0} |
|||
--- !u!104 &2 |
|||
RenderSettings: |
|||
m_ObjectHideFlags: 0 |
|||
serializedVersion: 8 |
|||
m_Fog: 0 |
|||
m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} |
|||
m_FogMode: 3 |
|||
m_FogDensity: 0.01 |
|||
m_LinearFogStart: 0 |
|||
m_LinearFogEnd: 300 |
|||
m_AmbientSkyColor: {r: 0, g: 0, b: 0, a: 1} |
|||
m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1} |
|||
m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1} |
|||
m_AmbientIntensity: 0 |
|||
m_AmbientMode: 3 |
|||
m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1} |
|||
m_SkyboxMaterial: {fileID: 0} |
|||
m_HaloStrength: 0.5 |
|||
m_FlareStrength: 1 |
|||
m_FlareFadeSpeed: 3 |
|||
m_HaloTexture: {fileID: 0} |
|||
m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0} |
|||
m_DefaultReflectionMode: 0 |
|||
m_DefaultReflectionResolution: 128 |
|||
m_ReflectionBounces: 1 |
|||
m_ReflectionIntensity: 1 |
|||
m_CustomReflection: {fileID: 0} |
|||
m_Sun: {fileID: 0} |
|||
m_IndirectSpecularColor: {r: 0, g: 0, b: 0, a: 1} |
|||
--- !u!157 &3 |
|||
LightmapSettings: |
|||
m_ObjectHideFlags: 0 |
|||
serializedVersion: 11 |
|||
m_GIWorkflowMode: 1 |
|||
m_GISettings: |
|||
serializedVersion: 2 |
|||
m_BounceScale: 1 |
|||
m_IndirectOutputScale: 1 |
|||
m_AlbedoBoost: 1 |
|||
m_TemporalCoherenceThreshold: 1 |
|||
m_EnvironmentLightingMode: 0 |
|||
m_EnableBakedLightmaps: 0 |
|||
m_EnableRealtimeLightmaps: 1 |
|||
m_LightmapEditorSettings: |
|||
serializedVersion: 9 |
|||
m_Resolution: 5 |
|||
m_BakeResolution: 40 |
|||
m_TextureWidth: 1024 |
|||
m_TextureHeight: 1024 |
|||
m_AO: 0 |
|||
m_AOMaxDistance: 1 |
|||
m_CompAOExponent: 1 |
|||
m_CompAOExponentDirect: 0 |
|||
m_Padding: 2 |
|||
m_LightmapParameters: {fileID: 0} |
|||
m_LightmapsBakeMode: 1 |
|||
m_TextureCompression: 1 |
|||
m_FinalGather: 0 |
|||
m_FinalGatherFiltering: 1 |
|||
m_FinalGatherRayCount: 256 |
|||
m_ReflectionCompression: 2 |
|||
m_MixedBakeMode: 2 |
|||
m_BakeBackend: 0 |
|||
m_PVRSampling: 1 |
|||
m_PVRDirectSampleCount: 32 |
|||
m_PVRSampleCount: 500 |
|||
m_PVRBounces: 2 |
|||
m_PVRFiltering: 0 |
|||
m_PVRFilteringMode: 1 |
|||
m_PVRCulling: 1 |
|||
m_PVRFilteringGaussRadiusDirect: 1 |
|||
m_PVRFilteringGaussRadiusIndirect: 5 |
|||
m_PVRFilteringGaussRadiusAO: 2 |
|||
m_PVRFilteringAtrousColorSigma: 1 |
|||
m_PVRFilteringAtrousNormalSigma: 1 |
|||
m_PVRFilteringAtrousPositionSigma: 1 |
|||
m_LightingDataAsset: {fileID: 112000014, guid: 80169afec4c3349f283d8485c5da132c, |
|||
type: 2} |
|||
m_UseShadowmask: 1 |
|||
--- !u!196 &4 |
|||
NavMeshSettings: |
|||
serializedVersion: 2 |
|||
m_ObjectHideFlags: 0 |
|||
m_BuildSettings: |
|||
serializedVersion: 2 |
|||
agentTypeID: 0 |
|||
agentRadius: 0.5 |
|||
agentHeight: 2 |
|||
agentSlope: 45 |
|||
agentClimb: 0.4 |
|||
ledgeDropHeight: 0 |
|||
maxJumpAcrossDistance: 0 |
|||
minRegionArea: 2 |
|||
manualCellSize: 0 |
|||
cellSize: 0.16666667 |
|||
manualTileSize: 0 |
|||
tileSize: 256 |
|||
accuratePlacement: 0 |
|||
debug: |
|||
m_Flags: 0 |
|||
m_NavMeshData: {fileID: 0} |
|||
--- !u!1 &548101002 |
|||
GameObject: |
|||
m_ObjectHideFlags: 0 |
|||
m_PrefabParentObject: {fileID: 0} |
|||
m_PrefabInternal: {fileID: 0} |
|||
serializedVersion: 5 |
|||
m_Component: |
|||
- component: {fileID: 548101007} |
|||
- component: {fileID: 548101006} |
|||
- component: {fileID: 548101005} |
|||
- component: {fileID: 548101004} |
|||
- component: {fileID: 548101003} |
|||
m_Layer: 0 |
|||
m_Name: Sphere (1) |
|||
m_TagString: Untagged |
|||
m_Icon: {fileID: 0} |
|||
m_NavMeshLayer: 0 |
|||
m_StaticEditorFlags: 4294967295 |
|||
m_IsActive: 1 |
|||
--- !u!114 &548101003 |
|||
MonoBehaviour: |
|||
m_ObjectHideFlags: 0 |
|||
m_PrefabParentObject: {fileID: 0} |
|||
m_PrefabInternal: {fileID: 0} |
|||
m_GameObject: {fileID: 548101002} |
|||
m_Enabled: 1 |
|||
m_EditorHideFlags: 0 |
|||
m_Script: {fileID: 11500000, guid: 0f51dcdd04caf4f8cadac0cfcb2c5e68, type: 3} |
|||
m_Name: |
|||
m_EditorClassIdentifier: |
|||
--- !u!23 &548101004 |
|||
MeshRenderer: |
|||
m_ObjectHideFlags: 0 |
|||
m_PrefabParentObject: {fileID: 0} |
|||
m_PrefabInternal: {fileID: 0} |
|||
m_GameObject: {fileID: 548101002} |
|||
m_Enabled: 1 |
|||
m_CastShadows: 1 |
|||
m_ReceiveShadows: 1 |
|||
m_DynamicOccludee: 1 |
|||
m_MotionVectors: 1 |
|||
m_LightProbeUsage: 1 |
|||
m_ReflectionProbeUsage: 1 |
|||
m_Materials: |
|||
- {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} |
|||
m_StaticBatchInfo: |
|||
firstSubMesh: 0 |
|||
subMeshCount: 0 |
|||
m_StaticBatchRoot: {fileID: 0} |
|||
m_ProbeAnchor: {fileID: 0} |
|||
m_LightProbeVolumeOverride: {fileID: 0} |
|||
m_ScaleInLightmap: 1 |
|||
m_PreserveUVs: 1 |
|||
m_IgnoreNormalsForChartDetection: 0 |
|||
m_ImportantGI: 0 |
|||
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 |
|||
--- !u!135 &548101005 |
|||
SphereCollider: |
|||
m_ObjectHideFlags: 0 |
|||
m_PrefabParentObject: {fileID: 0} |
|||
m_PrefabInternal: {fileID: 0} |
|||
m_GameObject: {fileID: 548101002} |
|||
m_Material: {fileID: 0} |
|||
m_IsTrigger: 0 |
|||
m_Enabled: 1 |
|||
serializedVersion: 2 |
|||
m_Radius: 0.5 |
|||
m_Center: {x: 0, y: 0, z: 0} |
|||
--- !u!33 &548101006 |
|||
MeshFilter: |
|||
m_ObjectHideFlags: 0 |
|||
m_PrefabParentObject: {fileID: 0} |
|||
m_PrefabInternal: {fileID: 0} |
|||
m_GameObject: {fileID: 548101002} |
|||
m_Mesh: {fileID: 4300000, guid: 09d069c253118446895355b8ca659a23, type: 3} |
|||
--- !u!4 &548101007 |
|||
Transform: |
|||
m_ObjectHideFlags: 0 |
|||
m_PrefabParentObject: {fileID: 0} |
|||
m_PrefabInternal: {fileID: 0} |
|||
m_GameObject: {fileID: 548101002} |
|||
m_LocalRotation: {x: -0, y: 0.99565375, z: -0, w: 0.09313222} |
|||
m_LocalPosition: {x: -1.51, y: 0, z: -0.399} |
|||
m_LocalScale: {x: 2, y: 2, z: 2} |
|||
m_Children: [] |
|||
m_Father: {fileID: 0} |
|||
m_RootOrder: 3 |
|||
m_LocalEulerAnglesHint: {x: 0, y: 169.31201, z: 0} |
|||
--- !u!1 &918167261 |
|||
GameObject: |
|||
m_ObjectHideFlags: 0 |
|||
m_PrefabParentObject: {fileID: 0} |
|||
m_PrefabInternal: {fileID: 0} |
|||
serializedVersion: 5 |
|||
m_Component: |
|||
- component: {fileID: 918167266} |
|||
- component: {fileID: 918167265} |
|||
- component: {fileID: 918167264} |
|||
- component: {fileID: 918167263} |
|||
- component: {fileID: 918167262} |
|||
m_Layer: 0 |
|||
m_Name: Main Camera |
|||
m_TagString: MainCamera |
|||
m_Icon: {fileID: 0} |
|||
m_NavMeshLayer: 0 |
|||
m_StaticEditorFlags: 0 |
|||
m_IsActive: 1 |
|||
--- !u!81 &918167262 |
|||
AudioListener: |
|||
m_ObjectHideFlags: 0 |
|||
m_PrefabParentObject: {fileID: 0} |
|||
m_PrefabInternal: {fileID: 0} |
|||
m_GameObject: {fileID: 918167261} |
|||
m_Enabled: 1 |
|||
--- !u!124 &918167263 |
|||
Behaviour: |
|||
m_ObjectHideFlags: 0 |
|||
m_PrefabParentObject: {fileID: 0} |
|||
m_PrefabInternal: {fileID: 0} |
|||
m_GameObject: {fileID: 918167261} |
|||
m_Enabled: 1 |
|||
--- !u!92 &918167264 |
|||
Behaviour: |
|||
m_ObjectHideFlags: 0 |
|||
m_PrefabParentObject: {fileID: 0} |
|||
m_PrefabInternal: {fileID: 0} |
|||
m_GameObject: {fileID: 918167261} |
|||
m_Enabled: 1 |
|||
--- !u!20 &918167265 |
|||
Camera: |
|||
m_ObjectHideFlags: 0 |
|||
m_PrefabParentObject: {fileID: 0} |
|||
m_PrefabInternal: {fileID: 0} |
|||
m_GameObject: {fileID: 918167261} |
|||
m_Enabled: 1 |
|||
serializedVersion: 2 |
|||
m_ClearFlags: 2 |
|||
m_BackGroundColor: {r: 0, g: 0, b: 0, a: 0} |
|||
m_NormalizedViewPortRect: |
|||
serializedVersion: 2 |
|||
x: 0 |
|||
y: 0 |
|||
width: 1 |
|||
height: 1 |
|||
near clip plane: 0.3 |
|||
far clip plane: 1000 |
|||
field of view: 60 |
|||
orthographic: 0 |
|||
orthographic size: 5 |
|||
m_Depth: -1 |
|||
m_CullingMask: |
|||
serializedVersion: 2 |
|||
m_Bits: 4294967295 |
|||
m_RenderingPath: -1 |
|||
m_TargetTexture: {fileID: 0} |
|||
m_TargetDisplay: 0 |
|||
m_TargetEye: 3 |
|||
m_HDR: 1 |
|||
m_AllowMSAA: 1 |
|||
m_ForceIntoRT: 0 |
|||
m_OcclusionCulling: 1 |
|||
m_StereoConvergence: 10 |
|||
m_StereoSeparation: 0.022 |
|||
m_StereoMirrorMode: 0 |
|||
--- !u!4 &918167266 |
|||
Transform: |
|||
m_ObjectHideFlags: 0 |
|||
m_PrefabParentObject: {fileID: 0} |
|||
m_PrefabInternal: {fileID: 0} |
|||
m_GameObject: {fileID: 918167261} |
|||
m_LocalRotation: {x: 0.09232531, y: -0.86123407, z: 0.47028187, w: 0.1690767} |
|||
m_LocalPosition: {x: 0.49040473, y: 2.31, z: 1.200889} |
|||
m_LocalScale: {x: 1, y: 1, z: 1} |
|||
m_Children: [] |
|||
m_Father: {fileID: 0} |
|||
m_RootOrder: 0 |
|||
m_LocalEulerAnglesHint: {x: 57.274002, y: -157.78601, z: 0} |
|||
--- !u!1 &1009691226 |
|||
GameObject: |
|||
m_ObjectHideFlags: 0 |
|||
m_PrefabParentObject: {fileID: 0} |
|||
m_PrefabInternal: {fileID: 0} |
|||
serializedVersion: 5 |
|||
m_Component: |
|||
- component: {fileID: 1009691231} |
|||
- component: {fileID: 1009691230} |
|||
- component: {fileID: 1009691229} |
|||
- component: {fileID: 1009691228} |
|||
- component: {fileID: 1009691227} |
|||
m_Layer: 0 |
|||
m_Name: Sphere (4) |
|||
m_TagString: Untagged |
|||
m_Icon: {fileID: 0} |
|||
m_NavMeshLayer: 0 |
|||
m_StaticEditorFlags: 4294967295 |
|||
m_IsActive: 1 |
|||
--- !u!114 &1009691227 |
|||
MonoBehaviour: |
|||
m_ObjectHideFlags: 0 |
|||
m_PrefabParentObject: {fileID: 0} |
|||
m_PrefabInternal: {fileID: 0} |
|||
m_GameObject: {fileID: 1009691226} |
|||
m_Enabled: 1 |
|||
m_EditorHideFlags: 0 |
|||
m_Script: {fileID: 11500000, guid: 0f51dcdd04caf4f8cadac0cfcb2c5e68, type: 3} |
|||
m_Name: |
|||
m_EditorClassIdentifier: |
|||
--- !u!23 &1009691228 |
|||
MeshRenderer: |
|||
m_ObjectHideFlags: 0 |
|||
m_PrefabParentObject: {fileID: 0} |
|||
m_PrefabInternal: {fileID: 0} |
|||
m_GameObject: {fileID: 1009691226} |
|||
m_Enabled: 1 |
|||
m_CastShadows: 1 |
|||
m_ReceiveShadows: 1 |
|||
m_DynamicOccludee: 1 |
|||
m_MotionVectors: 1 |
|||
m_LightProbeUsage: 1 |
|||
m_ReflectionProbeUsage: 1 |
|||
m_Materials: |
|||
- {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} |
|||
m_StaticBatchInfo: |
|||
firstSubMesh: 0 |
|||
subMeshCount: 0 |
|||
m_StaticBatchRoot: {fileID: 0} |
|||
m_ProbeAnchor: {fileID: 0} |
|||
m_LightProbeVolumeOverride: {fileID: 0} |
|||
m_ScaleInLightmap: 1 |
|||
m_PreserveUVs: 1 |
|||
m_IgnoreNormalsForChartDetection: 0 |
|||
m_ImportantGI: 0 |
|||
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 |
|||
--- !u!135 &1009691229 |
|||
SphereCollider: |
|||
m_ObjectHideFlags: 0 |
|||
m_PrefabParentObject: {fileID: 0} |
|||
m_PrefabInternal: {fileID: 0} |
|||
m_GameObject: {fileID: 1009691226} |
|||
m_Material: {fileID: 0} |
|||
m_IsTrigger: 0 |
|||
m_Enabled: 1 |
|||
serializedVersion: 2 |
|||
m_Radius: 0.5 |
|||
m_Center: {x: 0, y: 0, z: 0} |
|||
--- !u!33 &1009691230 |
|||
MeshFilter: |
|||
m_ObjectHideFlags: 0 |
|||
m_PrefabParentObject: {fileID: 0} |
|||
m_PrefabInternal: {fileID: 0} |
|||
m_GameObject: {fileID: 1009691226} |
|||
m_Mesh: {fileID: 4300000, guid: 09d069c253118446895355b8ca659a23, type: 3} |
|||
--- !u!4 &1009691231 |
|||
Transform: |
|||
m_ObjectHideFlags: 0 |
|||
m_PrefabParentObject: {fileID: 0} |
|||
m_PrefabInternal: {fileID: 0} |
|||
m_GameObject: {fileID: 1009691226} |
|||
m_LocalRotation: {x: -0, y: -0.0349411, z: -0, w: -0.9993894} |
|||
m_LocalPosition: {x: 1.577, y: 0, z: 0.137} |
|||
m_LocalScale: {x: 2, y: 2, z: 2} |
|||
m_Children: [] |
|||
m_Father: {fileID: 0} |
|||
m_RootOrder: 6 |
|||
m_LocalEulerAnglesHint: {x: 0, y: 364.005, z: 0} |
|||
--- !u!1 &1402672312 |
|||
GameObject: |
|||
m_ObjectHideFlags: 0 |
|||
m_PrefabParentObject: {fileID: 0} |
|||
m_PrefabInternal: {fileID: 0} |
|||
serializedVersion: 5 |
|||
m_Component: |
|||
- component: {fileID: 1402672317} |
|||
- component: {fileID: 1402672316} |
|||
- component: {fileID: 1402672315} |
|||
- component: {fileID: 1402672314} |
|||
- component: {fileID: 1402672313} |
|||
m_Layer: 0 |
|||
m_Name: Sphere (3) |
|||
m_TagString: Untagged |
|||
m_Icon: {fileID: 0} |
|||
m_NavMeshLayer: 0 |
|||
m_StaticEditorFlags: 4294967295 |
|||
m_IsActive: 1 |
|||
--- !u!114 &1402672313 |
|||
MonoBehaviour: |
|||
m_ObjectHideFlags: 0 |
|||
m_PrefabParentObject: {fileID: 0} |
|||
m_PrefabInternal: {fileID: 0} |
|||
m_GameObject: {fileID: 1402672312} |
|||
m_Enabled: 1 |
|||
m_EditorHideFlags: 0 |
|||
m_Script: {fileID: 11500000, guid: 0f51dcdd04caf4f8cadac0cfcb2c5e68, type: 3} |
|||
m_Name: |
|||
m_EditorClassIdentifier: |
|||
--- !u!23 &1402672314 |
|||
MeshRenderer: |
|||
m_ObjectHideFlags: 0 |
|||
m_PrefabParentObject: {fileID: 0} |
|||
m_PrefabInternal: {fileID: 0} |
|||
m_GameObject: {fileID: 1402672312} |
|||
m_Enabled: 1 |
|||
m_CastShadows: 1 |
|||
m_ReceiveShadows: 1 |
|||
m_DynamicOccludee: 1 |
|||
m_MotionVectors: 1 |
|||
m_LightProbeUsage: 1 |
|||
m_ReflectionProbeUsage: 1 |
|||
m_Materials: |
|||
- {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} |
|||
m_StaticBatchInfo: |
|||
firstSubMesh: 0 |
|||
subMeshCount: 0 |
|||
m_StaticBatchRoot: {fileID: 0} |
|||
m_ProbeAnchor: {fileID: 0} |
|||
m_LightProbeVolumeOverride: {fileID: 0} |
|||
m_ScaleInLightmap: 1 |
|||
m_PreserveUVs: 1 |
|||
m_IgnoreNormalsForChartDetection: 0 |
|||
m_ImportantGI: 0 |
|||
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 |
|||
--- !u!135 &1402672315 |
|||
SphereCollider: |
|||
m_ObjectHideFlags: 0 |
|||
m_PrefabParentObject: {fileID: 0} |
|||
m_PrefabInternal: {fileID: 0} |
|||
m_GameObject: {fileID: 1402672312} |
|||
m_Material: {fileID: 0} |
|||
m_IsTrigger: 0 |
|||
m_Enabled: 1 |
|||
serializedVersion: 2 |
|||
m_Radius: 0.5 |
|||
m_Center: {x: 0, y: 0, z: 0} |
|||
--- !u!33 &1402672316 |
|||
MeshFilter: |
|||
m_ObjectHideFlags: 0 |
|||
m_PrefabParentObject: {fileID: 0} |
|||
m_PrefabInternal: {fileID: 0} |
|||
m_GameObject: {fileID: 1402672312} |
|||
m_Mesh: {fileID: 4300000, guid: 09d069c253118446895355b8ca659a23, type: 3} |
|||
--- !u!4 &1402672317 |
|||
Transform: |
|||
m_ObjectHideFlags: 0 |
|||
m_PrefabParentObject: {fileID: 0} |
|||
m_PrefabInternal: {fileID: 0} |
|||
m_GameObject: {fileID: 1402672312} |
|||
m_LocalRotation: {x: -0, y: 0.7706488, z: -0, w: -0.6372602} |
|||
m_LocalPosition: {x: -0.143, y: 0, z: 1.453} |
|||
m_LocalScale: {x: 2, y: 2, z: 2} |
|||
m_Children: [] |
|||
m_Father: {fileID: 0} |
|||
m_RootOrder: 5 |
|||
m_LocalEulerAnglesHint: {x: 0, y: 259.176, z: 0} |
|||
--- !u!1 &1806358012 |
|||
GameObject: |
|||
m_ObjectHideFlags: 0 |
|||
m_PrefabParentObject: {fileID: 0} |
|||
m_PrefabInternal: {fileID: 0} |
|||
serializedVersion: 5 |
|||
m_Component: |
|||
- component: {fileID: 1806358017} |
|||
- component: {fileID: 1806358016} |
|||
- component: {fileID: 1806358015} |
|||
- component: {fileID: 1806358014} |
|||
- component: {fileID: 1806358013} |
|||
m_Layer: 0 |
|||
m_Name: Sphere (2) |
|||
m_TagString: Untagged |
|||
m_Icon: {fileID: 0} |
|||
m_NavMeshLayer: 0 |
|||
m_StaticEditorFlags: 4294967295 |
|||
m_IsActive: 1 |
|||
--- !u!114 &1806358013 |
|||
MonoBehaviour: |
|||
m_ObjectHideFlags: 0 |
|||
m_PrefabParentObject: {fileID: 0} |
|||
m_PrefabInternal: {fileID: 0} |
|||
m_GameObject: {fileID: 1806358012} |
|||
m_Enabled: 1 |
|||
m_EditorHideFlags: 0 |
|||
m_Script: {fileID: 11500000, guid: 0f51dcdd04caf4f8cadac0cfcb2c5e68, type: 3} |
|||
m_Name: |
|||
m_EditorClassIdentifier: |
|||
--- !u!23 &1806358014 |
|||
MeshRenderer: |
|||
m_ObjectHideFlags: 0 |
|||
m_PrefabParentObject: {fileID: 0} |
|||
m_PrefabInternal: {fileID: 0} |
|||
m_GameObject: {fileID: 1806358012} |
|||
m_Enabled: 1 |
|||
m_CastShadows: 1 |
|||
m_ReceiveShadows: 1 |
|||
m_DynamicOccludee: 1 |
|||
m_MotionVectors: 1 |
|||
m_LightProbeUsage: 1 |
|||
m_ReflectionProbeUsage: 1 |
|||
m_Materials: |
|||
- {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} |
|||
m_StaticBatchInfo: |
|||
firstSubMesh: 0 |
|||
subMeshCount: 0 |
|||
m_StaticBatchRoot: {fileID: 0} |
|||
m_ProbeAnchor: {fileID: 0} |
|||
m_LightProbeVolumeOverride: {fileID: 0} |
|||
m_ScaleInLightmap: 1 |
|||
m_PreserveUVs: 1 |
|||
m_IgnoreNormalsForChartDetection: 0 |
|||
m_ImportantGI: 0 |
|||
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 |
|||
--- !u!135 &1806358015 |
|||
SphereCollider: |
|||
m_ObjectHideFlags: 0 |
|||
m_PrefabParentObject: {fileID: 0} |
|||
m_PrefabInternal: {fileID: 0} |
|||
m_GameObject: {fileID: 1806358012} |
|||
m_Material: {fileID: 0} |
|||
m_IsTrigger: 0 |
|||
m_Enabled: 1 |
|||
serializedVersion: 2 |
|||
m_Radius: 0.5 |
|||
m_Center: {x: 0, y: 0, z: 0} |
|||
--- !u!33 &1806358016 |
|||
MeshFilter: |
|||
m_ObjectHideFlags: 0 |
|||
m_PrefabParentObject: {fileID: 0} |
|||
m_PrefabInternal: {fileID: 0} |
|||
m_GameObject: {fileID: 1806358012} |
|||
m_Mesh: {fileID: 4300000, guid: 09d069c253118446895355b8ca659a23, type: 3} |
|||
--- !u!4 &1806358017 |
|||
Transform: |
|||
m_ObjectHideFlags: 0 |
|||
m_PrefabParentObject: {fileID: 0} |
|||
m_PrefabInternal: {fileID: 0} |
|||
m_GameObject: {fileID: 1806358012} |
|||
m_LocalRotation: {x: -0, y: 0.7706488, z: -0, w: -0.6372602} |
|||
m_LocalPosition: {x: 0.457, y: 0, z: -1.534} |
|||
m_LocalScale: {x: 2, y: 2, z: 2} |
|||
m_Children: [] |
|||
m_Father: {fileID: 0} |
|||
m_RootOrder: 4 |
|||
m_LocalEulerAnglesHint: {x: 0, y: 259.176, z: 0} |
|||
--- !u!1 &2021134166 |
|||
GameObject: |
|||
m_ObjectHideFlags: 0 |
|||
m_PrefabParentObject: {fileID: 0} |
|||
m_PrefabInternal: {fileID: 0} |
|||
serializedVersion: 5 |
|||
m_Component: |
|||
- component: {fileID: 2021134170} |
|||
- component: {fileID: 2021134169} |
|||
- component: {fileID: 2021134168} |
|||
- component: {fileID: 2021134167} |
|||
- component: {fileID: 2021134171} |
|||
m_Layer: 0 |
|||
m_Name: Sphere |
|||
m_TagString: Untagged |
|||
m_Icon: {fileID: 0} |
|||
m_NavMeshLayer: 0 |
|||
m_StaticEditorFlags: 4294967295 |
|||
m_IsActive: 1 |
|||
--- !u!23 &2021134167 |
|||
MeshRenderer: |
|||
m_ObjectHideFlags: 0 |
|||
m_PrefabParentObject: {fileID: 0} |
|||
m_PrefabInternal: {fileID: 0} |
|||
m_GameObject: {fileID: 2021134166} |
|||
m_Enabled: 1 |
|||
m_CastShadows: 1 |
|||
m_ReceiveShadows: 1 |
|||
m_DynamicOccludee: 1 |
|||
m_MotionVectors: 1 |
|||
m_LightProbeUsage: 1 |
|||
m_ReflectionProbeUsage: 1 |
|||
m_Materials: |
|||
- {fileID: 2100000, guid: 348ddedbff8cf4f6a9ba7d3e838621e7, type: 2} |
|||
m_StaticBatchInfo: |
|||
firstSubMesh: 0 |
|||
subMeshCount: 0 |
|||
m_StaticBatchRoot: {fileID: 0} |
|||
m_ProbeAnchor: {fileID: 0} |
|||
m_LightProbeVolumeOverride: {fileID: 0} |
|||
m_ScaleInLightmap: 1 |
|||
m_PreserveUVs: 1 |
|||
m_IgnoreNormalsForChartDetection: 0 |
|||
m_ImportantGI: 0 |
|||
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 |
|||
--- !u!135 &2021134168 |
|||
SphereCollider: |
|||
m_ObjectHideFlags: 0 |
|||
m_PrefabParentObject: {fileID: 0} |
|||
m_PrefabInternal: {fileID: 0} |
|||
m_GameObject: {fileID: 2021134166} |
|||
m_Material: {fileID: 0} |
|||
m_IsTrigger: 0 |
|||
m_Enabled: 1 |
|||
serializedVersion: 2 |
|||
m_Radius: 0.5 |
|||
m_Center: {x: 0, y: 0, z: 0} |
|||
--- !u!33 &2021134169 |
|||
MeshFilter: |
|||
m_ObjectHideFlags: 0 |
|||
m_PrefabParentObject: {fileID: 0} |
|||
m_PrefabInternal: {fileID: 0} |
|||
m_GameObject: {fileID: 2021134166} |
|||
m_Mesh: {fileID: 4300000, guid: 09d069c253118446895355b8ca659a23, type: 3} |
|||
--- !u!4 &2021134170 |
|||
Transform: |
|||
m_ObjectHideFlags: 0 |
|||
m_PrefabParentObject: {fileID: 0} |
|||
m_PrefabInternal: {fileID: 0} |
|||
m_GameObject: {fileID: 2021134166} |
|||
m_LocalRotation: {x: 0, y: 0.8922314, z: 0, w: 0.45157853} |
|||
m_LocalPosition: {x: 0, y: 0, z: 0} |
|||
m_LocalScale: {x: 2, y: 2, z: 2} |
|||
m_Children: [] |
|||
m_Father: {fileID: 0} |
|||
m_RootOrder: 2 |
|||
m_LocalEulerAnglesHint: {x: 0, y: 126.31, z: 0} |
|||
--- !u!114 &2021134171 |
|||
MonoBehaviour: |
|||
m_ObjectHideFlags: 0 |
|||
m_PrefabParentObject: {fileID: 0} |
|||
m_PrefabInternal: {fileID: 0} |
|||
m_GameObject: {fileID: 2021134166} |
|||
m_Enabled: 1 |
|||
m_EditorHideFlags: 0 |
|||
m_Script: {fileID: 11500000, guid: 0f51dcdd04caf4f8cadac0cfcb2c5e68, type: 3} |
|||
m_Name: |
|||
m_EditorClassIdentifier: |
|||
--- !u!1 &2135345123 |
|||
GameObject: |
|||
m_ObjectHideFlags: 0 |
|||
m_PrefabParentObject: {fileID: 0} |
|||
m_PrefabInternal: {fileID: 0} |
|||
serializedVersion: 5 |
|||
m_Component: |
|||
- component: {fileID: 2135345127} |
|||
- component: {fileID: 2135345126} |
|||
- component: {fileID: 2135345125} |
|||
- component: {fileID: 2135345124} |
|||
m_Layer: 0 |
|||
m_Name: Plane |
|||
m_TagString: Untagged |
|||
m_Icon: {fileID: 0} |
|||
m_NavMeshLayer: 0 |
|||
m_StaticEditorFlags: 4294967295 |
|||
m_IsActive: 1 |
|||
--- !u!23 &2135345124 |
|||
MeshRenderer: |
|||
m_ObjectHideFlags: 0 |
|||
m_PrefabParentObject: {fileID: 0} |
|||
m_PrefabInternal: {fileID: 0} |
|||
m_GameObject: {fileID: 2135345123} |
|||
m_Enabled: 1 |
|||
m_CastShadows: 1 |
|||
m_ReceiveShadows: 1 |
|||
m_DynamicOccludee: 1 |
|||
m_MotionVectors: 1 |
|||
m_LightProbeUsage: 1 |
|||
m_ReflectionProbeUsage: 1 |
|||
m_Materials: |
|||
- {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} |
|||
m_StaticBatchInfo: |
|||
firstSubMesh: 0 |
|||
subMeshCount: 0 |
|||
m_StaticBatchRoot: {fileID: 0} |
|||
m_ProbeAnchor: {fileID: 0} |
|||
m_LightProbeVolumeOverride: {fileID: 0} |
|||
m_ScaleInLightmap: 1 |
|||
m_PreserveUVs: 1 |
|||
m_IgnoreNormalsForChartDetection: 0 |
|||
m_ImportantGI: 0 |
|||
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 |
|||
--- !u!64 &2135345125 |
|||
MeshCollider: |
|||
m_ObjectHideFlags: 0 |
|||
m_PrefabParentObject: {fileID: 0} |
|||
m_PrefabInternal: {fileID: 0} |
|||
m_GameObject: {fileID: 2135345123} |
|||
m_Material: {fileID: 0} |
|||
m_IsTrigger: 0 |
|||
m_Enabled: 1 |
|||
serializedVersion: 2 |
|||
m_Convex: 0 |
|||
m_InflateMesh: 0 |
|||
m_SkinWidth: 0.01 |
|||
m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0} |
|||
--- !u!33 &2135345126 |
|||
MeshFilter: |
|||
m_ObjectHideFlags: 0 |
|||
m_PrefabParentObject: {fileID: 0} |
|||
m_PrefabInternal: {fileID: 0} |
|||
m_GameObject: {fileID: 2135345123} |
|||
m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0} |
|||
--- !u!4 &2135345127 |
|||
Transform: |
|||
m_ObjectHideFlags: 0 |
|||
m_PrefabParentObject: {fileID: 0} |
|||
m_PrefabInternal: {fileID: 0} |
|||
m_GameObject: {fileID: 2135345123} |
|||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} |
|||
m_LocalPosition: {x: 0, y: 0, z: 0} |
|||
m_LocalScale: {x: 0.60128516, y: 0.60128516, z: 0.60128516} |
|||
m_Children: [] |
|||
m_Father: {fileID: 0} |
|||
m_RootOrder: 1 |
|||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} |
|
|||
fileFormatVersion: 2 |
|||
guid: 80169afec4c3349f283d8485c5da132c |
|||
timeCreated: 1495643456 |
|||
licenseType: Pro |
|||
NativeFormatImporter: |
|||
mainObjectFileID: 25800000 |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
fileFormatVersion: 2 |
|||
guid: 56307115839c24b9085afc1e6c34e152 |
|||
folderAsset: yes |
|||
timeCreated: 1495640948 |
|||
licenseType: Pro |
|||
DefaultImporter: |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
1001
MaterialGraphProject/Assets/Andre/Scenes/LightProbeTesting.unity
文件差异内容过多而无法显示
查看文件
文件差异内容过多而无法显示
查看文件
|
|||
fileFormatVersion: 2 |
|||
guid: d122b3a63d9cb4fc7a5596235490b378 |
|||
timeCreated: 1495640903 |
|||
licenseType: Pro |
|||
DefaultImporter: |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
1001
MaterialGraphProject/Assets/Andre/Scenes/LightProbeTesting/LightingData.asset
文件差异内容过多而无法显示
查看文件
文件差异内容过多而无法显示
查看文件
|
|||
fileFormatVersion: 2 |
|||
guid: 76fa9a6b0fe364cfabe5badef15c8ca6 |
|||
timeCreated: 1495641032 |
|||
licenseType: Pro |
|||
NativeFormatImporter: |
|||
mainObjectFileID: 25800000 |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
fileFormatVersion: 2 |
|||
guid: ba4179b90b9c240c7939c5c338fb3811 |
|||
timeCreated: 1495641030 |
|||
licenseType: Pro |
|||
TextureImporter: |
|||
fileIDToRecycleName: {} |
|||
serializedVersion: 4 |
|||
mipmaps: |
|||
mipMapMode: 0 |
|||
enableMipMap: 1 |
|||
sRGBTexture: 0 |
|||
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 |
|||
grayScaleToAlpha: 0 |
|||
generateCubemap: 6 |
|||
cubemapConvolution: 0 |
|||
seamlessCubemap: 0 |
|||
textureFormat: 1 |
|||
maxTextureSize: 2048 |
|||
textureSettings: |
|||
serializedVersion: 2 |
|||
filterMode: 1 |
|||
aniso: 3 |
|||
mipBias: 0 |
|||
wrapU: 1 |
|||
wrapV: 1 |
|||
wrapW: 1 |
|||
nPOTScale: 1 |
|||
lightmap: 0 |
|||
compressionQuality: 50 |
|||
spriteMode: 0 |
|||
spriteExtrude: 1 |
|||
spriteMeshType: 1 |
|||
alignment: 0 |
|||
spritePivot: {x: 0.5, y: 0.5} |
|||
spriteBorder: {x: 0, y: 0, z: 0, w: 0} |
|||
spritePixelsToUnits: 100 |
|||
alphaUsage: 1 |
|||
alphaIsTransparency: 0 |
|||
spriteTessellationDetail: -1 |
|||
textureType: 0 |
|||
textureShape: 1 |
|||
maxTextureSizeSet: 0 |
|||
compressionQualitySet: 0 |
|||
textureFormatSet: 0 |
|||
platformSettings: |
|||
- buildTarget: DefaultTexturePlatform |
|||
maxTextureSize: 2048 |
|||
resizeAlgorithm: 0 |
|||
textureFormat: -1 |
|||
textureCompression: 1 |
|||
compressionQuality: 50 |
|||
crunchedCompression: 0 |
|||
allowsAlphaSplitting: 0 |
|||
overridden: 0 |
|||
spriteSheet: |
|||
serializedVersion: 2 |
|||
sprites: [] |
|||
outline: [] |
|||
physicsShape: [] |
|||
spritePackingTag: |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
v/1 channels chlist I A B G R compression compression dataWindow box2i � � displayWindow box2i � � lineOrder lineOrder pixelAspectRatio float �?screenWindowCenter v2f screenWindowWidth float �? � 1 3 �+ �D _] �w �� � i� �� � �J �p �� � ^ � V |
|||
|