diff options
| -rw-r--r-- | 2ner.cginc | 18 | ||||
| -rw-r--r-- | 2ner.shader | 8 | ||||
| -rw-r--r-- | Materials/Mat00.mat | 68 | ||||
| -rw-r--r-- | Materials/Mat00_Filament.mat | 3 | ||||
| -rw-r--r-- | Materials/Mat01.mat | 70 | ||||
| -rw-r--r-- | Materials/Mat01_Filament.mat | 3 | ||||
| -rw-r--r-- | Materials/Mat02.mat | 68 | ||||
| -rw-r--r-- | Materials/Mat02_Filament.mat | 3 | ||||
| -rw-r--r-- | Materials/Mat03.mat | 72 | ||||
| -rw-r--r-- | Materials/Mat03_Filament.mat | 3 | ||||
| -rw-r--r-- | Materials/Mat04.mat | 57 | ||||
| -rw-r--r-- | Materials/Mat05.mat | 57 | ||||
| -rw-r--r-- | Materials/Mat06.mat | 57 | ||||
| -rw-r--r-- | Materials/Mat07.mat | 57 | ||||
| -rw-r--r-- | Test scene.unity | 917 | ||||
| -rw-r--r-- | features.cginc | 9 | ||||
| -rw-r--r-- | filamented.cginc | 89 | ||||
| -rw-r--r-- | globals.cginc | 4 | ||||
| -rw-r--r-- | interpolators.cginc | 22 | ||||
| -rw-r--r-- | yum_lighting.cginc | 11 | ||||
| -rw-r--r-- | yum_pbr.cginc | 10 |
21 files changed, 1546 insertions, 60 deletions
@@ -12,7 +12,7 @@ #include "yum_pbr.cginc"
#include "yum_lighting.cginc"
-v2f vert (appdata v) {
+v2f vert(appdata v) {
v2f o;
UNITY_SETUP_INSTANCE_ID(v);
@@ -22,7 +22,7 @@ v2f vert (appdata v) { #if defined(OUTLINE_PASS)
#if defined(_OUTLINE_MASK)
- float thickness = _Outline_Mask.SampleLevel(linear_repeat_s, v.uv, 0);
+ float thickness = _Outline_Mask.SampleLevel(linear_repeat_s, v.uv01, 0);
#else
float thickness = 1;
#endif
@@ -31,14 +31,22 @@ v2f vert (appdata v) { v.tangent *= -1;
#endif // OUTLINE_PASS
o.pos = UnityObjectToClipPos(v.vertex);
- o.uv = TRANSFORM_TEX(v.uv, _MainTex);
+ o.uv01.xy = TRANSFORM_TEX(v.uv01.xy, _MainTex);
+ o.uv01.zw = TRANSFORM_TEX(v.uv01.zw, _MainTex);
o.worldPos = mul(unity_ObjectToWorld, v.vertex);
o.eyeVec.xyz = normalize(o.worldPos - _WorldSpaceCameraPos);
// Calculate TBN matrix
o.normal = UnityObjectToWorldNormal(v.normal);
o.tangent = UnityObjectToWorldDir(v.tangent.xyz);
- o.bitangent = cross(o.normal, o.tangent) * v.tangent.w;
+ o.binormal = cross(o.normal, o.tangent) * v.tangent.w * unity_WorldTransformParams.w;
+
+ // From filamented
+ float3 lightDirWS = normalize(_WorldSpaceLightPos0.xyz - o.worldPos * _WorldSpaceLightPos0.w);
+ o.lightDirTS = float3(
+ dot(o.tangent, lightDirWS),
+ dot(o.binormal, lightDirWS),
+ dot(o.normal, lightDirWS));
UNITY_TRANSFER_LIGHTING(o, v.uv1);
UNITY_TRANSFER_FOG_COMBINED_WITH_EYE_VEC(o, o.pos);
@@ -48,7 +56,7 @@ v2f vert (appdata v) { return o;
}
-float4 frag (v2f i) : SV_Target {
+float4 frag(v2f i) : SV_Target {
UNITY_APPLY_DITHER_CROSSFADE(i.pos.xy);
UNITY_SETUP_INSTANCE_ID(i);
UNITY_SETUP_STEREO_EYE_INDEX_POST_VERTEX(i);
diff --git a/2ner.shader b/2ner.shader index 3fee380..dbf4d2e 100644 --- a/2ner.shader +++ b/2ner.shader @@ -35,8 +35,14 @@ Shader "yum_food/2ner" _BumpScale("Normal Intensity", Range(0, 10)) = 1 _OcclusionMap("Ambient occlusion", 2D) = "white" {} _OcclusionStrength("Ambient occlusion", Range(0,1)) = 1 - _Clip("Alpha Cuttoff", Range(0, 1.001)) = 0.5 + //ifex _Bump_Shadows_Enabled==0 + [HideInInspector] m_start_BumpShadows("Normal shadows", Float) = 0 + [ThryToggle(_BUMP_SHADOWS)]_Bump_Shadows_Enabled("Enable", Float) = 0 + _BumpShadowHeightScale("Height", Range(0, 1)) = 0.2 + _BumpShadowHardness("Hardness", Range(0, 100)) = 50 + [HideInInspector] m_end_BumpShadows("Metallics", Float) = 0 + //endex [HideInInspector] m_reflectionOptions("Reflections", Float) = 0 [HideInInspector] m_start_Metallic("Metallics", Float) = 0 diff --git a/Materials/Mat00.mat b/Materials/Mat00.mat index 591c049..67d3366 100644 --- a/Materials/Mat00.mat +++ b/Materials/Mat00.mat @@ -11,8 +11,10 @@ Material: m_Shader: {fileID: 4800000, guid: b4e71db42d10be94e9a50ee0569be871, type: 3} m_Parent: {fileID: 0} m_ModifiedSerializedProperties: 0 - m_ValidKeywords: [] - m_InvalidKeywords: [] + m_ValidKeywords: + - _BUMP_SHADOWS + m_InvalidKeywords: + - _RECEIVE_SHADOWS m_LightmapFlags: 4 m_EnableInstancingVariants: 0 m_DoubleSidedGI: 0 @@ -24,7 +26,7 @@ Material: serializedVersion: 3 m_TexEnvs: - _BumpMap: - m_Texture: {fileID: 0} + m_Texture: {fileID: 2800000, guid: 2dc42dfedb2bc704d984f7990c6b816a, type: 3} m_Scale: {x: 1, y: 1} m_Offset: {x: 0, y: 0} - _CubeMap: @@ -67,6 +69,10 @@ Material: m_Texture: {fileID: 0} m_Scale: {x: 1, y: 1} m_Offset: {x: 0, y: 0} + - _Outline_Mask: + 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} @@ -77,12 +83,26 @@ Material: m_Offset: {x: 0, y: 0} m_Ints: [] m_Floats: + - _AddBlendOp: 4 + - _AddBlendOpAlpha: 4 + - _AddDstBlend: 1 + - _AddDstBlendAlpha: 1 + - _AddSrcBlend: 1 + - _AddSrcBlendAlpha: 0 + - _BlendOp: 0 + - _BlendOpAlpha: 0 - _BumpScale: 1 + - _BumpShadowHardness: 50 + - _BumpShadowHeightScale: 0.2 + - _BumpShadowsEnabled: 0 + - _Bump_Shadows_Enabled: 1 + - _Cast_Shadows_Enabled: 1 - _Clip: 0.5 - _Cull: 2 - _Cutoff: 0.5 - _DetailNormalMapScale: 1 - _DstBlend: 0 + - _DstBlendAlpha: 10 - _EnableMetallic: 0 - _ForgotToLockMaterial: 0 - _GlossMapScale: 1 @@ -92,25 +112,66 @@ Material: - _Metallic: 0 - _Mode: 0 - _OcclusionStrength: 1 + - _OutlineBlendOp: 0 + - _OutlineBlendOpAlpha: 4 + - _OutlineDstBlend: 0 + - _OutlineDstBlendAlpha: 0 + - _OutlineSrcBlend: 1 + - _OutlineSrcBlendAlpha: 1 + - _Outline_Mask_Enabled: 0 + - _Outline_Width: 0 + - _OutlinesEnabled: 0 - _Parallax: 0.02 + - _Receive_Shadows_Enabled: 1 - _SampleWorld: 0 - _Saturation: 0 - _ShaderOptimizerEnabled: 0 + - _Shadow_Strength: 0.25 - _Smoothness: 0 - _SmoothnessTextureChannel: 0 - _SpecularHighlights: 1 + - _SphericalHarmonics: 1 - _SrcBlend: 1 + - _SrcBlendAlpha: 1 - _UVSec: 0 + - _Wrap_NoL_Diffuse_Strength: 0.25 + - _Wrap_NoL_Specular_Strength: 0.1 + - _Wrapped_Lighting_Enabled: 0 - _ZTest: 4 - _ZWrite: 1 + - _reflectance: 0.028 + - _reflectance_help: 1 - _specularAntiAliasingThreshold: 0.25 - _specularAntiAliasingVariance: 0.15 + - m_FilamentStuff: 0 - m_LUTs: 1 + - m_end_BumpShadows: 0 - m_end_Metallic: 0 + - m_end_Outlines: 0 + - m_end_OutlinesMask: 0 + - m_end_Shadow_Casting: 0 + - m_end_Shadow_Receiving: 0 + - m_end_WrappedLighting: 0 + - m_end_alphaBlending: 0 + - m_end_blending: 0 + - m_end_outlineAlphaBlending: 0 + - m_end_outlineBlending: 0 + - m_gimmicks: 1 + - m_lightingOptions: 1 - m_mainOptions: 1 - m_reflectionOptions: 1 - m_renderingOptions: 0 + - m_start_BumpShadows: 1 - m_start_Metallic: 1 + - m_start_Outlines: 1 + - m_start_OutlinesMask: 0 + - m_start_Shadow_Casting: 0 + - m_start_Shadow_Receiving: 0 + - m_start_WrappedLighting: 1 + - m_start_alphaBlending: 0 + - m_start_blending: 0 + - m_start_outlineAlphaBlending: 0 + - m_start_outlineBlending: 0 - shader_is_using_thry_editor: 0 - shader_master_label: 0 - shader_presets: 0 @@ -119,4 +180,5 @@ Material: - _Color: {r: 1, g: 1, b: 1, a: 1} - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} - _MetalReflectionTint: {r: 1, g: 1, b: 1, a: 1} + - _Outline_Color: {r: 0, g: 0, b: 0, a: 1} m_BuildTextureStacks: [] diff --git a/Materials/Mat00_Filament.mat b/Materials/Mat00_Filament.mat index 8ed0851..0b909f0 100644 --- a/Materials/Mat00_Filament.mat +++ b/Materials/Mat00_Filament.mat @@ -13,6 +13,7 @@ Material: m_ModifiedSerializedProperties: 0 m_ValidKeywords: - _LIGHTMAPSPECULAR + - _NORMALMAP m_InvalidKeywords: - _BAKERY_NONE m_LightmapFlags: 4 @@ -26,7 +27,7 @@ Material: serializedVersion: 3 m_TexEnvs: - _BumpMap: - m_Texture: {fileID: 0} + m_Texture: {fileID: 2800000, guid: 2dc42dfedb2bc704d984f7990c6b816a, type: 3} m_Scale: {x: 1, y: 1} m_Offset: {x: 0, y: 0} - _CubeMap: diff --git a/Materials/Mat01.mat b/Materials/Mat01.mat index 594f20c..164e99e 100644 --- a/Materials/Mat01.mat +++ b/Materials/Mat01.mat @@ -11,8 +11,10 @@ Material: m_Shader: {fileID: 4800000, guid: b4e71db42d10be94e9a50ee0569be871, type: 3} m_Parent: {fileID: 0} m_ModifiedSerializedProperties: 0 - m_ValidKeywords: [] - m_InvalidKeywords: [] + m_ValidKeywords: + - _BUMP_SHADOWS + m_InvalidKeywords: + - _RECEIVE_SHADOWS m_LightmapFlags: 4 m_EnableInstancingVariants: 0 m_DoubleSidedGI: 0 @@ -24,7 +26,7 @@ Material: serializedVersion: 3 m_TexEnvs: - _BumpMap: - m_Texture: {fileID: 0} + m_Texture: {fileID: 2800000, guid: 2dc42dfedb2bc704d984f7990c6b816a, type: 3} m_Scale: {x: 1, y: 1} m_Offset: {x: 0, y: 0} - _CubeMap: @@ -67,6 +69,10 @@ Material: m_Texture: {fileID: 0} m_Scale: {x: 1, y: 1} m_Offset: {x: 0, y: 0} + - _Outline_Mask: + 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} @@ -77,12 +83,26 @@ Material: m_Offset: {x: 0, y: 0} m_Ints: [] m_Floats: + - _AddBlendOp: 4 + - _AddBlendOpAlpha: 4 + - _AddDstBlend: 1 + - _AddDstBlendAlpha: 1 + - _AddSrcBlend: 1 + - _AddSrcBlendAlpha: 0 + - _BlendOp: 0 + - _BlendOpAlpha: 0 - _BumpScale: 1 + - _BumpShadowHardness: 50 + - _BumpShadowHeightScale: 0.2 + - _BumpShadowsEnabled: 0 + - _Bump_Shadows_Enabled: 1 + - _Cast_Shadows_Enabled: 1 - _Clip: 0.5 - _Cull: 2 - _Cutoff: 0.5 - _DetailNormalMapScale: 1 - _DstBlend: 0 + - _DstBlendAlpha: 10 - _EnableMetallic: 0 - _ForgotToLockMaterial: 0 - _GlossMapScale: 1 @@ -92,23 +112,66 @@ Material: - _Metallic: 0 - _Mode: 0 - _OcclusionStrength: 1 + - _OutlineBlendOp: 0 + - _OutlineBlendOpAlpha: 4 + - _OutlineDstBlend: 0 + - _OutlineDstBlendAlpha: 0 + - _OutlineSrcBlend: 1 + - _OutlineSrcBlendAlpha: 1 + - _Outline_Mask_Enabled: 0 + - _Outline_Width: 0 + - _OutlinesEnabled: 0 - _Parallax: 0.02 + - _Receive_Shadows_Enabled: 1 - _SampleWorld: 0 - _Saturation: 0 - _ShaderOptimizerEnabled: 0 + - _Shadow_Strength: 0.25 - _Smoothness: 1 - _SmoothnessTextureChannel: 0 - _SpecularHighlights: 1 + - _SphericalHarmonics: 1 - _SrcBlend: 1 + - _SrcBlendAlpha: 1 - _UVSec: 0 + - _Wrap_NoL_Diffuse_Strength: 0.25 + - _Wrap_NoL_Specular_Strength: 0.1 + - _Wrapped_Lighting_Enabled: 0 - _ZTest: 4 - _ZWrite: 1 + - _reflectance: 0.028 + - _reflectance_help: 1 + - _specularAntiAliasingThreshold: 0.25 + - _specularAntiAliasingVariance: 0.15 + - m_FilamentStuff: 0 - m_LUTs: 1 + - m_end_BumpShadows: 0 - m_end_Metallic: 0 + - m_end_Outlines: 0 + - m_end_OutlinesMask: 0 + - m_end_Shadow_Casting: 0 + - m_end_Shadow_Receiving: 0 + - m_end_WrappedLighting: 0 + - m_end_alphaBlending: 0 + - m_end_blending: 0 + - m_end_outlineAlphaBlending: 0 + - m_end_outlineBlending: 0 + - m_gimmicks: 1 + - m_lightingOptions: 1 - m_mainOptions: 1 - m_reflectionOptions: 1 - m_renderingOptions: 0 + - m_start_BumpShadows: 1 - m_start_Metallic: 1 + - m_start_Outlines: 1 + - m_start_OutlinesMask: 0 + - m_start_Shadow_Casting: 0 + - m_start_Shadow_Receiving: 0 + - m_start_WrappedLighting: 1 + - m_start_alphaBlending: 0 + - m_start_blending: 0 + - m_start_outlineAlphaBlending: 0 + - m_start_outlineBlending: 0 - shader_is_using_thry_editor: 0 - shader_master_label: 0 - shader_presets: 0 @@ -117,4 +180,5 @@ Material: - _Color: {r: 1, g: 1, b: 1, a: 1} - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} - _MetalReflectionTint: {r: 1, g: 1, b: 1, a: 1} + - _Outline_Color: {r: 0, g: 0, b: 0, a: 1} m_BuildTextureStacks: [] diff --git a/Materials/Mat01_Filament.mat b/Materials/Mat01_Filament.mat index 360711b..7fb21e9 100644 --- a/Materials/Mat01_Filament.mat +++ b/Materials/Mat01_Filament.mat @@ -13,6 +13,7 @@ Material: m_ModifiedSerializedProperties: 0 m_ValidKeywords: - _LIGHTMAPSPECULAR + - _NORMALMAP m_InvalidKeywords: - _BAKERY_NONE m_LightmapFlags: 4 @@ -26,7 +27,7 @@ Material: serializedVersion: 3 m_TexEnvs: - _BumpMap: - m_Texture: {fileID: 0} + m_Texture: {fileID: 2800000, guid: 2dc42dfedb2bc704d984f7990c6b816a, type: 3} m_Scale: {x: 1, y: 1} m_Offset: {x: 0, y: 0} - _CubeMap: diff --git a/Materials/Mat02.mat b/Materials/Mat02.mat index cfe7a0c..326d0c0 100644 --- a/Materials/Mat02.mat +++ b/Materials/Mat02.mat @@ -11,8 +11,10 @@ Material: m_Shader: {fileID: 4800000, guid: b4e71db42d10be94e9a50ee0569be871, type: 3} m_Parent: {fileID: 0} m_ModifiedSerializedProperties: 0 - m_ValidKeywords: [] - m_InvalidKeywords: [] + m_ValidKeywords: + - _BUMP_SHADOWS + m_InvalidKeywords: + - _RECEIVE_SHADOWS m_LightmapFlags: 4 m_EnableInstancingVariants: 0 m_DoubleSidedGI: 0 @@ -24,7 +26,7 @@ Material: serializedVersion: 3 m_TexEnvs: - _BumpMap: - m_Texture: {fileID: 0} + m_Texture: {fileID: 2800000, guid: 2dc42dfedb2bc704d984f7990c6b816a, type: 3} m_Scale: {x: 1, y: 1} m_Offset: {x: 0, y: 0} - _CubeMap: @@ -67,6 +69,10 @@ Material: m_Texture: {fileID: 0} m_Scale: {x: 1, y: 1} m_Offset: {x: 0, y: 0} + - _Outline_Mask: + 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} @@ -77,12 +83,26 @@ Material: m_Offset: {x: 0, y: 0} m_Ints: [] m_Floats: + - _AddBlendOp: 4 + - _AddBlendOpAlpha: 4 + - _AddDstBlend: 1 + - _AddDstBlendAlpha: 1 + - _AddSrcBlend: 1 + - _AddSrcBlendAlpha: 0 + - _BlendOp: 0 + - _BlendOpAlpha: 0 - _BumpScale: 1 + - _BumpShadowHardness: 50 + - _BumpShadowHeightScale: 0.2 + - _BumpShadowsEnabled: 0 + - _Bump_Shadows_Enabled: 1 + - _Cast_Shadows_Enabled: 1 - _Clip: 0.5 - _Cull: 2 - _Cutoff: 0.5 - _DetailNormalMapScale: 1 - _DstBlend: 0 + - _DstBlendAlpha: 10 - _EnableMetallic: 0 - _ForgotToLockMaterial: 0 - _GlossMapScale: 1 @@ -92,25 +112,66 @@ Material: - _Metallic: 0 - _Mode: 0 - _OcclusionStrength: 1 + - _OutlineBlendOp: 0 + - _OutlineBlendOpAlpha: 4 + - _OutlineDstBlend: 0 + - _OutlineDstBlendAlpha: 0 + - _OutlineSrcBlend: 1 + - _OutlineSrcBlendAlpha: 1 + - _Outline_Mask_Enabled: 0 + - _Outline_Width: 0 + - _OutlinesEnabled: 0 - _Parallax: 0.02 + - _Receive_Shadows_Enabled: 1 - _SampleWorld: 0 - _Saturation: 0 - _ShaderOptimizerEnabled: 0 + - _Shadow_Strength: 0.25 - _Smoothness: 0 - _SmoothnessTextureChannel: 0 - _SpecularHighlights: 1 + - _SphericalHarmonics: 1 - _SrcBlend: 1 + - _SrcBlendAlpha: 1 - _UVSec: 0 + - _Wrap_NoL_Diffuse_Strength: 0.25 + - _Wrap_NoL_Specular_Strength: 0.1 + - _Wrapped_Lighting_Enabled: 0 - _ZTest: 4 - _ZWrite: 1 + - _reflectance: 0.028 + - _reflectance_help: 1 - _specularAntiAliasingThreshold: 0.25 - _specularAntiAliasingVariance: 0.15 + - m_FilamentStuff: 0 - m_LUTs: 1 + - m_end_BumpShadows: 0 - m_end_Metallic: 0 + - m_end_Outlines: 0 + - m_end_OutlinesMask: 0 + - m_end_Shadow_Casting: 0 + - m_end_Shadow_Receiving: 0 + - m_end_WrappedLighting: 0 + - m_end_alphaBlending: 0 + - m_end_blending: 0 + - m_end_outlineAlphaBlending: 0 + - m_end_outlineBlending: 0 + - m_gimmicks: 1 + - m_lightingOptions: 1 - m_mainOptions: 1 - m_reflectionOptions: 1 - m_renderingOptions: 0 + - m_start_BumpShadows: 1 - m_start_Metallic: 1 + - m_start_Outlines: 1 + - m_start_OutlinesMask: 0 + - m_start_Shadow_Casting: 0 + - m_start_Shadow_Receiving: 0 + - m_start_WrappedLighting: 1 + - m_start_alphaBlending: 0 + - m_start_blending: 0 + - m_start_outlineAlphaBlending: 0 + - m_start_outlineBlending: 0 - shader_is_using_thry_editor: 0 - shader_master_label: 0 - shader_presets: 0 @@ -119,4 +180,5 @@ Material: - _Color: {r: 0.25, g: 0.25, b: 0.25, a: 1} - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} - _MetalReflectionTint: {r: 1, g: 1, b: 1, a: 1} + - _Outline_Color: {r: 0, g: 0, b: 0, a: 1} m_BuildTextureStacks: [] diff --git a/Materials/Mat02_Filament.mat b/Materials/Mat02_Filament.mat index 5494416..ab953da 100644 --- a/Materials/Mat02_Filament.mat +++ b/Materials/Mat02_Filament.mat @@ -13,6 +13,7 @@ Material: m_ModifiedSerializedProperties: 0 m_ValidKeywords: - _LIGHTMAPSPECULAR + - _NORMALMAP m_InvalidKeywords: - _BAKERY_NONE m_LightmapFlags: 4 @@ -26,7 +27,7 @@ Material: serializedVersion: 3 m_TexEnvs: - _BumpMap: - m_Texture: {fileID: 0} + m_Texture: {fileID: 2800000, guid: 2dc42dfedb2bc704d984f7990c6b816a, type: 3} m_Scale: {x: 1, y: 1} m_Offset: {x: 0, y: 0} - _CubeMap: diff --git a/Materials/Mat03.mat b/Materials/Mat03.mat index faef48a..971e9bf 100644 --- a/Materials/Mat03.mat +++ b/Materials/Mat03.mat @@ -11,8 +11,10 @@ Material: m_Shader: {fileID: 4800000, guid: b4e71db42d10be94e9a50ee0569be871, type: 3} m_Parent: {fileID: 0} m_ModifiedSerializedProperties: 0 - m_ValidKeywords: [] - m_InvalidKeywords: [] + m_ValidKeywords: + - _BUMP_SHADOWS + m_InvalidKeywords: + - _RECEIVE_SHADOWS m_LightmapFlags: 4 m_EnableInstancingVariants: 0 m_DoubleSidedGI: 0 @@ -24,7 +26,7 @@ Material: serializedVersion: 3 m_TexEnvs: - _BumpMap: - m_Texture: {fileID: 0} + m_Texture: {fileID: 2800000, guid: 2dc42dfedb2bc704d984f7990c6b816a, type: 3} m_Scale: {x: 1, y: 1} m_Offset: {x: 0, y: 0} - _CubeMap: @@ -67,6 +69,10 @@ Material: m_Texture: {fileID: 0} m_Scale: {x: 1, y: 1} m_Offset: {x: 0, y: 0} + - _Outline_Mask: + 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} @@ -77,12 +83,26 @@ Material: m_Offset: {x: 0, y: 0} m_Ints: [] m_Floats: - - _BumpScale: 1 + - _AddBlendOp: 4 + - _AddBlendOpAlpha: 4 + - _AddDstBlend: 1 + - _AddDstBlendAlpha: 1 + - _AddSrcBlend: 1 + - _AddSrcBlendAlpha: 0 + - _BlendOp: 0 + - _BlendOpAlpha: 0 + - _BumpScale: 1.96 + - _BumpShadowHardness: 1 + - _BumpShadowHeightScale: 10 + - _BumpShadowsEnabled: 0 + - _Bump_Shadows_Enabled: 1 + - _Cast_Shadows_Enabled: 1 - _Clip: 0.5 - _Cull: 2 - _Cutoff: 0.5 - _DetailNormalMapScale: 1 - _DstBlend: 0 + - _DstBlendAlpha: 10 - _EnableMetallic: 0 - _ForgotToLockMaterial: 0 - _GlossMapScale: 1 @@ -92,23 +112,66 @@ Material: - _Metallic: 0 - _Mode: 0 - _OcclusionStrength: 1 + - _OutlineBlendOp: 0 + - _OutlineBlendOpAlpha: 4 + - _OutlineDstBlend: 0 + - _OutlineDstBlendAlpha: 0 + - _OutlineSrcBlend: 1 + - _OutlineSrcBlendAlpha: 1 + - _Outline_Mask_Enabled: 0 + - _Outline_Width: 0 + - _OutlinesEnabled: 0 - _Parallax: 0.02 + - _Receive_Shadows_Enabled: 1 - _SampleWorld: 0 - _Saturation: 0 - _ShaderOptimizerEnabled: 0 + - _Shadow_Strength: 0.25 - _Smoothness: 1 - _SmoothnessTextureChannel: 0 - _SpecularHighlights: 1 + - _SphericalHarmonics: 1 - _SrcBlend: 1 + - _SrcBlendAlpha: 1 - _UVSec: 0 + - _Wrap_NoL_Diffuse_Strength: 0.25 + - _Wrap_NoL_Specular_Strength: 0.1 + - _Wrapped_Lighting_Enabled: 0 - _ZTest: 4 - _ZWrite: 1 + - _reflectance: 0.028 + - _reflectance_help: 1 + - _specularAntiAliasingThreshold: 0.25 + - _specularAntiAliasingVariance: 0.15 + - m_FilamentStuff: 0 - m_LUTs: 1 + - m_end_BumpShadows: 0 - m_end_Metallic: 0 + - m_end_Outlines: 0 + - m_end_OutlinesMask: 0 + - m_end_Shadow_Casting: 0 + - m_end_Shadow_Receiving: 0 + - m_end_WrappedLighting: 0 + - m_end_alphaBlending: 0 + - m_end_blending: 0 + - m_end_outlineAlphaBlending: 0 + - m_end_outlineBlending: 0 + - m_gimmicks: 1 + - m_lightingOptions: 1 - m_mainOptions: 1 - m_reflectionOptions: 1 - m_renderingOptions: 0 + - m_start_BumpShadows: 1 - m_start_Metallic: 1 + - m_start_Outlines: 1 + - m_start_OutlinesMask: 0 + - m_start_Shadow_Casting: 0 + - m_start_Shadow_Receiving: 0 + - m_start_WrappedLighting: 1 + - m_start_alphaBlending: 0 + - m_start_blending: 0 + - m_start_outlineAlphaBlending: 0 + - m_start_outlineBlending: 0 - shader_is_using_thry_editor: 0 - shader_master_label: 0 - shader_presets: 0 @@ -117,4 +180,5 @@ Material: - _Color: {r: 0.25, g: 0.25, b: 0.25, a: 1} - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} - _MetalReflectionTint: {r: 1, g: 1, b: 1, a: 1} + - _Outline_Color: {r: 0, g: 0, b: 0, a: 1} m_BuildTextureStacks: [] diff --git a/Materials/Mat03_Filament.mat b/Materials/Mat03_Filament.mat index daa26f4..adee2ff 100644 --- a/Materials/Mat03_Filament.mat +++ b/Materials/Mat03_Filament.mat @@ -13,6 +13,7 @@ Material: m_ModifiedSerializedProperties: 0 m_ValidKeywords: - _LIGHTMAPSPECULAR + - _NORMALMAP m_InvalidKeywords: - _BAKERY_NONE m_LightmapFlags: 4 @@ -26,7 +27,7 @@ Material: serializedVersion: 3 m_TexEnvs: - _BumpMap: - m_Texture: {fileID: 0} + m_Texture: {fileID: 2800000, guid: 2dc42dfedb2bc704d984f7990c6b816a, type: 3} m_Scale: {x: 1, y: 1} m_Offset: {x: 0, y: 0} - _CubeMap: diff --git a/Materials/Mat04.mat b/Materials/Mat04.mat index 978c2e9..09e30eb 100644 --- a/Materials/Mat04.mat +++ b/Materials/Mat04.mat @@ -12,7 +12,8 @@ Material: m_Parent: {fileID: 0} m_ModifiedSerializedProperties: 0 m_ValidKeywords: [] - m_InvalidKeywords: [] + m_InvalidKeywords: + - _RECEIVE_SHADOWS m_LightmapFlags: 4 m_EnableInstancingVariants: 0 m_DoubleSidedGI: 0 @@ -67,6 +68,10 @@ Material: m_Texture: {fileID: 0} m_Scale: {x: 1, y: 1} m_Offset: {x: 0, y: 0} + - _Outline_Mask: + 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} @@ -77,12 +82,22 @@ Material: m_Offset: {x: 0, y: 0} m_Ints: [] m_Floats: + - _AddBlendOp: 4 + - _AddBlendOpAlpha: 4 + - _AddDstBlend: 1 + - _AddDstBlendAlpha: 1 + - _AddSrcBlend: 1 + - _AddSrcBlendAlpha: 0 + - _BlendOp: 0 + - _BlendOpAlpha: 0 - _BumpScale: 1 + - _Cast_Shadows_Enabled: 1 - _Clip: 0.5 - _Cull: 2 - _Cutoff: 0.5 - _DetailNormalMapScale: 1 - _DstBlend: 0 + - _DstBlendAlpha: 10 - _EnableMetallic: 0 - _ForgotToLockMaterial: 0 - _GlossMapScale: 1 @@ -92,27 +107,66 @@ Material: - _Metallic: 1 - _Mode: 0 - _OcclusionStrength: 1 + - _OutlineBlendOp: 0 + - _OutlineBlendOpAlpha: 4 + - _OutlineDstBlend: 0 + - _OutlineDstBlendAlpha: 0 + - _OutlineSrcBlend: 1 + - _OutlineSrcBlendAlpha: 1 + - _Outline_Mask_Enabled: 0 + - _Outline_Width: 0 + - _OutlinesEnabled: 0 - _Parallax: 0.02 + - _Receive_Shadows_Enabled: 1 - _SampleWorld: 0 - _Saturation: 0 - _ShaderOptimizerEnabled: 0 + - _Shadow_Strength: 0.25 - _Smoothness: 0 - _SmoothnessTextureChannel: 0 - _SpecularHighlights: 1 + - _SphericalHarmonics: 1 - _SrcBlend: 1 + - _SrcBlendAlpha: 1 - _UVSec: 0 + - _Wrap_NoL_Diffuse_Strength: 0.25 + - _Wrap_NoL_Specular_Strength: 0.1 + - _Wrapped_Lighting_Enabled: 0 - _ZTest: 4 - _ZWrite: 1 + - _reflectance: 0.028 + - _reflectance_help: 1 - _specularAntiAliasingThreshold: 0.25 - _specularAntiAliasingVariance: 0.15 - footer_github: 0 - footer_youtube: 0 + - m_FilamentStuff: 0 - m_LUTs: 1 - m_end_Metallic: 0 + - m_end_Outlines: 0 + - m_end_OutlinesMask: 0 + - m_end_Shadow_Casting: 0 + - m_end_Shadow_Receiving: 0 + - m_end_WrappedLighting: 0 + - m_end_alphaBlending: 0 + - m_end_blending: 0 + - m_end_outlineAlphaBlending: 0 + - m_end_outlineBlending: 0 + - m_gimmicks: 1 + - m_lightingOptions: 1 - m_mainOptions: 1 - m_reflectionOptions: 1 - m_renderingOptions: 0 - m_start_Metallic: 1 + - m_start_Outlines: 1 + - m_start_OutlinesMask: 0 + - m_start_Shadow_Casting: 0 + - m_start_Shadow_Receiving: 0 + - m_start_WrappedLighting: 1 + - m_start_alphaBlending: 0 + - m_start_blending: 0 + - m_start_outlineAlphaBlending: 0 + - m_start_outlineBlending: 0 - shader_is_using_thry_editor: 0 - shader_master_label: 0 - shader_presets: 0 @@ -121,4 +175,5 @@ Material: - _Color: {r: 1, g: 1, b: 1, a: 1} - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} - _MetalReflectionTint: {r: 1, g: 1, b: 1, a: 1} + - _Outline_Color: {r: 0, g: 0, b: 0, a: 1} m_BuildTextureStacks: [] diff --git a/Materials/Mat05.mat b/Materials/Mat05.mat index ab579cd..35f38d0 100644 --- a/Materials/Mat05.mat +++ b/Materials/Mat05.mat @@ -12,7 +12,8 @@ Material: m_Parent: {fileID: 0} m_ModifiedSerializedProperties: 0 m_ValidKeywords: [] - m_InvalidKeywords: [] + m_InvalidKeywords: + - _RECEIVE_SHADOWS m_LightmapFlags: 4 m_EnableInstancingVariants: 0 m_DoubleSidedGI: 0 @@ -67,6 +68,10 @@ Material: m_Texture: {fileID: 0} m_Scale: {x: 1, y: 1} m_Offset: {x: 0, y: 0} + - _Outline_Mask: + 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} @@ -77,12 +82,22 @@ Material: m_Offset: {x: 0, y: 0} m_Ints: [] m_Floats: + - _AddBlendOp: 4 + - _AddBlendOpAlpha: 4 + - _AddDstBlend: 1 + - _AddDstBlendAlpha: 1 + - _AddSrcBlend: 1 + - _AddSrcBlendAlpha: 0 + - _BlendOp: 0 + - _BlendOpAlpha: 0 - _BumpScale: 1 + - _Cast_Shadows_Enabled: 1 - _Clip: 0.5 - _Cull: 2 - _Cutoff: 0.5 - _DetailNormalMapScale: 1 - _DstBlend: 0 + - _DstBlendAlpha: 10 - _EnableMetallic: 0 - _ForgotToLockMaterial: 0 - _GlossMapScale: 1 @@ -92,27 +107,66 @@ Material: - _Metallic: 1 - _Mode: 0 - _OcclusionStrength: 1 + - _OutlineBlendOp: 0 + - _OutlineBlendOpAlpha: 4 + - _OutlineDstBlend: 0 + - _OutlineDstBlendAlpha: 0 + - _OutlineSrcBlend: 1 + - _OutlineSrcBlendAlpha: 1 + - _Outline_Mask_Enabled: 0 + - _Outline_Width: 0 + - _OutlinesEnabled: 0 - _Parallax: 0.02 + - _Receive_Shadows_Enabled: 1 - _SampleWorld: 0 - _Saturation: 0 - _ShaderOptimizerEnabled: 0 + - _Shadow_Strength: 0.25 - _Smoothness: 1 - _SmoothnessTextureChannel: 0 - _SpecularHighlights: 1 + - _SphericalHarmonics: 1 - _SrcBlend: 1 + - _SrcBlendAlpha: 1 - _UVSec: 0 + - _Wrap_NoL_Diffuse_Strength: 0.25 + - _Wrap_NoL_Specular_Strength: 0.1 + - _Wrapped_Lighting_Enabled: 0 - _ZTest: 4 - _ZWrite: 1 + - _reflectance: 0.028 + - _reflectance_help: 1 - _specularAntiAliasingThreshold: 0.25 - _specularAntiAliasingVariance: 0.15 - footer_github: 0 - footer_youtube: 0 + - m_FilamentStuff: 0 - m_LUTs: 1 - m_end_Metallic: 0 + - m_end_Outlines: 0 + - m_end_OutlinesMask: 0 + - m_end_Shadow_Casting: 0 + - m_end_Shadow_Receiving: 0 + - m_end_WrappedLighting: 0 + - m_end_alphaBlending: 0 + - m_end_blending: 0 + - m_end_outlineAlphaBlending: 0 + - m_end_outlineBlending: 0 + - m_gimmicks: 1 + - m_lightingOptions: 1 - m_mainOptions: 1 - m_reflectionOptions: 1 - m_renderingOptions: 0 - m_start_Metallic: 1 + - m_start_Outlines: 1 + - m_start_OutlinesMask: 0 + - m_start_Shadow_Casting: 0 + - m_start_Shadow_Receiving: 0 + - m_start_WrappedLighting: 1 + - m_start_alphaBlending: 0 + - m_start_blending: 0 + - m_start_outlineAlphaBlending: 0 + - m_start_outlineBlending: 0 - shader_is_using_thry_editor: 0 - shader_master_label: 0 - shader_presets: 0 @@ -121,4 +175,5 @@ Material: - _Color: {r: 1, g: 1, b: 1, a: 1} - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} - _MetalReflectionTint: {r: 1, g: 1, b: 1, a: 1} + - _Outline_Color: {r: 0, g: 0, b: 0, a: 1} m_BuildTextureStacks: [] diff --git a/Materials/Mat06.mat b/Materials/Mat06.mat index 23abc00..2f9e0d2 100644 --- a/Materials/Mat06.mat +++ b/Materials/Mat06.mat @@ -12,7 +12,8 @@ Material: m_Parent: {fileID: 0} m_ModifiedSerializedProperties: 0 m_ValidKeywords: [] - m_InvalidKeywords: [] + m_InvalidKeywords: + - _RECEIVE_SHADOWS m_LightmapFlags: 4 m_EnableInstancingVariants: 0 m_DoubleSidedGI: 0 @@ -67,6 +68,10 @@ Material: m_Texture: {fileID: 0} m_Scale: {x: 1, y: 1} m_Offset: {x: 0, y: 0} + - _Outline_Mask: + 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} @@ -77,12 +82,22 @@ Material: m_Offset: {x: 0, y: 0} m_Ints: [] m_Floats: + - _AddBlendOp: 4 + - _AddBlendOpAlpha: 4 + - _AddDstBlend: 1 + - _AddDstBlendAlpha: 1 + - _AddSrcBlend: 1 + - _AddSrcBlendAlpha: 0 + - _BlendOp: 0 + - _BlendOpAlpha: 0 - _BumpScale: 1 + - _Cast_Shadows_Enabled: 1 - _Clip: 0.5 - _Cull: 2 - _Cutoff: 0.5 - _DetailNormalMapScale: 1 - _DstBlend: 0 + - _DstBlendAlpha: 10 - _EnableMetallic: 0 - _ForgotToLockMaterial: 0 - _GlossMapScale: 1 @@ -92,27 +107,66 @@ Material: - _Metallic: 1 - _Mode: 0 - _OcclusionStrength: 1 + - _OutlineBlendOp: 0 + - _OutlineBlendOpAlpha: 4 + - _OutlineDstBlend: 0 + - _OutlineDstBlendAlpha: 0 + - _OutlineSrcBlend: 1 + - _OutlineSrcBlendAlpha: 1 + - _Outline_Mask_Enabled: 0 + - _Outline_Width: 0 + - _OutlinesEnabled: 0 - _Parallax: 0.02 + - _Receive_Shadows_Enabled: 1 - _SampleWorld: 0 - _Saturation: 0 - _ShaderOptimizerEnabled: 0 + - _Shadow_Strength: 0.25 - _Smoothness: 0 - _SmoothnessTextureChannel: 0 - _SpecularHighlights: 1 + - _SphericalHarmonics: 1 - _SrcBlend: 1 + - _SrcBlendAlpha: 1 - _UVSec: 0 + - _Wrap_NoL_Diffuse_Strength: 0.25 + - _Wrap_NoL_Specular_Strength: 0.1 + - _Wrapped_Lighting_Enabled: 0 - _ZTest: 4 - _ZWrite: 1 + - _reflectance: 0.028 + - _reflectance_help: 1 - _specularAntiAliasingThreshold: 0.25 - _specularAntiAliasingVariance: 0.15 - footer_github: 0 - footer_youtube: 0 + - m_FilamentStuff: 0 - m_LUTs: 1 - m_end_Metallic: 0 + - m_end_Outlines: 0 + - m_end_OutlinesMask: 0 + - m_end_Shadow_Casting: 0 + - m_end_Shadow_Receiving: 0 + - m_end_WrappedLighting: 0 + - m_end_alphaBlending: 0 + - m_end_blending: 0 + - m_end_outlineAlphaBlending: 0 + - m_end_outlineBlending: 0 + - m_gimmicks: 1 + - m_lightingOptions: 1 - m_mainOptions: 1 - m_reflectionOptions: 1 - m_renderingOptions: 0 - m_start_Metallic: 1 + - m_start_Outlines: 1 + - m_start_OutlinesMask: 0 + - m_start_Shadow_Casting: 0 + - m_start_Shadow_Receiving: 0 + - m_start_WrappedLighting: 1 + - m_start_alphaBlending: 0 + - m_start_blending: 0 + - m_start_outlineAlphaBlending: 0 + - m_start_outlineBlending: 0 - shader_is_using_thry_editor: 0 - shader_master_label: 0 - shader_presets: 0 @@ -121,4 +175,5 @@ Material: - _Color: {r: 0.25, g: 0.25, b: 0.25, a: 1} - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} - _MetalReflectionTint: {r: 1, g: 1, b: 1, a: 1} + - _Outline_Color: {r: 0, g: 0, b: 0, a: 1} m_BuildTextureStacks: [] diff --git a/Materials/Mat07.mat b/Materials/Mat07.mat index 62f6d5c..897210c 100644 --- a/Materials/Mat07.mat +++ b/Materials/Mat07.mat @@ -12,7 +12,8 @@ Material: m_Parent: {fileID: 0} m_ModifiedSerializedProperties: 0 m_ValidKeywords: [] - m_InvalidKeywords: [] + m_InvalidKeywords: + - _RECEIVE_SHADOWS m_LightmapFlags: 4 m_EnableInstancingVariants: 0 m_DoubleSidedGI: 0 @@ -67,6 +68,10 @@ Material: m_Texture: {fileID: 0} m_Scale: {x: 1, y: 1} m_Offset: {x: 0, y: 0} + - _Outline_Mask: + 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} @@ -77,12 +82,22 @@ Material: m_Offset: {x: 0, y: 0} m_Ints: [] m_Floats: + - _AddBlendOp: 4 + - _AddBlendOpAlpha: 4 + - _AddDstBlend: 1 + - _AddDstBlendAlpha: 1 + - _AddSrcBlend: 1 + - _AddSrcBlendAlpha: 0 + - _BlendOp: 0 + - _BlendOpAlpha: 0 - _BumpScale: 1.15 + - _Cast_Shadows_Enabled: 1 - _Clip: 0.5 - _Cull: 2 - _Cutoff: 0.5 - _DetailNormalMapScale: 1 - _DstBlend: 0 + - _DstBlendAlpha: 10 - _EnableMetallic: 0 - _ForgotToLockMaterial: 0 - _GlossMapScale: 1 @@ -92,27 +107,66 @@ Material: - _Metallic: 1 - _Mode: 0 - _OcclusionStrength: 1 + - _OutlineBlendOp: 0 + - _OutlineBlendOpAlpha: 4 + - _OutlineDstBlend: 0 + - _OutlineDstBlendAlpha: 0 + - _OutlineSrcBlend: 1 + - _OutlineSrcBlendAlpha: 1 + - _Outline_Mask_Enabled: 0 + - _Outline_Width: 0 + - _OutlinesEnabled: 0 - _Parallax: 0.02 + - _Receive_Shadows_Enabled: 1 - _SampleWorld: 0 - _Saturation: 0 - _ShaderOptimizerEnabled: 0 + - _Shadow_Strength: 0.25 - _Smoothness: 1 - _SmoothnessTextureChannel: 0 - _SpecularHighlights: 1 + - _SphericalHarmonics: 1 - _SrcBlend: 1 + - _SrcBlendAlpha: 1 - _UVSec: 0 + - _Wrap_NoL_Diffuse_Strength: 0.25 + - _Wrap_NoL_Specular_Strength: 0.1 + - _Wrapped_Lighting_Enabled: 0 - _ZTest: 4 - _ZWrite: 1 + - _reflectance: 0.028 + - _reflectance_help: 1 - _specularAntiAliasingThreshold: 0.25 - _specularAntiAliasingVariance: 0.15 - footer_github: 0 - footer_youtube: 0 + - m_FilamentStuff: 0 - m_LUTs: 1 - m_end_Metallic: 0 + - m_end_Outlines: 0 + - m_end_OutlinesMask: 0 + - m_end_Shadow_Casting: 0 + - m_end_Shadow_Receiving: 0 + - m_end_WrappedLighting: 0 + - m_end_alphaBlending: 0 + - m_end_blending: 0 + - m_end_outlineAlphaBlending: 0 + - m_end_outlineBlending: 0 + - m_gimmicks: 1 + - m_lightingOptions: 1 - m_mainOptions: 1 - m_reflectionOptions: 1 - m_renderingOptions: 0 - m_start_Metallic: 1 + - m_start_Outlines: 1 + - m_start_OutlinesMask: 0 + - m_start_Shadow_Casting: 0 + - m_start_Shadow_Receiving: 0 + - m_start_WrappedLighting: 1 + - m_start_alphaBlending: 0 + - m_start_blending: 0 + - m_start_outlineAlphaBlending: 0 + - m_start_outlineBlending: 0 - shader_is_using_thry_editor: 0 - shader_master_label: 0 - shader_presets: 0 @@ -121,4 +175,5 @@ Material: - _Color: {r: 0.25, g: 0.25, b: 0.25, a: 1} - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} - _MetalReflectionTint: {r: 1, g: 1, b: 1, a: 1} + - _Outline_Color: {r: 0, g: 0, b: 0, a: 1} m_BuildTextureStacks: [] diff --git a/Test scene.unity b/Test scene.unity index 45d9bf4..bf8e204 100644 --- a/Test scene.unity +++ b/Test scene.unity @@ -23,7 +23,7 @@ RenderSettings: m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, 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: 1.01 + m_AmbientIntensity: 1 m_AmbientMode: 0 m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1} m_SkyboxMaterial: {fileID: 10304, guid: 0000000000000000f000000000000000, type: 0} @@ -209,7 +209,7 @@ PrefabInstance: - target: {fileID: 919132149155446097, guid: febf8b50ebcf02f4e9a64c0cc7653e36, type: 3} propertyPath: m_Name - value: PureMetal_Rough_Filament_Dark + value: PureMetal_Rough_Dark_Filament objectReference: {fileID: 0} m_RemovedComponents: [] m_RemovedGameObjects: [] @@ -308,7 +308,7 @@ PrefabInstance: - target: {fileID: 919132149155446097, guid: febf8b50ebcf02f4e9a64c0cc7653e36, type: 3} propertyPath: m_Name - value: PureDiffuse_Rough_Filament + value: PureDielectric_Rough_Filament objectReference: {fileID: 0} m_RemovedComponents: [] m_RemovedGameObjects: [] @@ -413,6 +413,105 @@ Transform: m_Children: [] m_Father: {fileID: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1001 &549781460 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + serializedVersion: 3 + m_TransformParent: {fileID: 2066529950} + m_Modifications: + - target: {fileID: -8679921383154817045, guid: febf8b50ebcf02f4e9a64c0cc7653e36, + type: 3} + propertyPath: m_LocalScale.x + value: 100 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: febf8b50ebcf02f4e9a64c0cc7653e36, + type: 3} + propertyPath: m_LocalScale.y + value: 100 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: febf8b50ebcf02f4e9a64c0cc7653e36, + type: 3} + propertyPath: m_LocalScale.z + value: 100 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: febf8b50ebcf02f4e9a64c0cc7653e36, + type: 3} + propertyPath: m_LocalPosition.x + value: 0.004178956 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: febf8b50ebcf02f4e9a64c0cc7653e36, + type: 3} + propertyPath: m_LocalPosition.y + value: 0.78254396 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: febf8b50ebcf02f4e9a64c0cc7653e36, + type: 3} + propertyPath: m_LocalPosition.z + value: -8.94709 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: febf8b50ebcf02f4e9a64c0cc7653e36, + type: 3} + propertyPath: m_LocalRotation.w + value: 0.92454123 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: febf8b50ebcf02f4e9a64c0cc7653e36, + type: 3} + propertyPath: m_LocalRotation.x + value: -0.381082 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: febf8b50ebcf02f4e9a64c0cc7653e36, + type: 3} + propertyPath: m_LocalRotation.y + value: 0.0000000074505797 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: febf8b50ebcf02f4e9a64c0cc7653e36, + type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: febf8b50ebcf02f4e9a64c0cc7653e36, + type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: -44.801 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: febf8b50ebcf02f4e9a64c0cc7653e36, + type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: febf8b50ebcf02f4e9a64c0cc7653e36, + type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -7511558181221131132, guid: febf8b50ebcf02f4e9a64c0cc7653e36, + type: 3} + propertyPath: m_Materials.Array.data[0] + value: + objectReference: {fileID: 2100000, guid: 481565a71bf8eae43929aad7793dd8e9, type: 2} + - target: {fileID: 919132149155446097, guid: febf8b50ebcf02f4e9a64c0cc7653e36, + type: 3} + propertyPath: m_Name + value: PureDielectric_Rough_Dark + objectReference: {fileID: 0} + - target: {fileID: 919132149155446097, guid: febf8b50ebcf02f4e9a64c0cc7653e36, + type: 3} + propertyPath: m_IsActive + value: 1 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_RemovedGameObjects: [] + m_AddedGameObjects: [] + m_AddedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: febf8b50ebcf02f4e9a64c0cc7653e36, type: 3} +--- !u!4 &549781461 stripped +Transform: + m_CorrespondingSourceObject: {fileID: -8679921383154817045, guid: febf8b50ebcf02f4e9a64c0cc7653e36, + type: 3} + m_PrefabInstance: {fileID: 549781460} + m_PrefabAsset: {fileID: 0} --- !u!1001 &796883255 PrefabInstance: m_ObjectHideFlags: 0 @@ -499,7 +598,7 @@ PrefabInstance: - target: {fileID: 919132149155446097, guid: febf8b50ebcf02f4e9a64c0cc7653e36, type: 3} propertyPath: m_Name - value: PureDiffuse_Smooth_Filament_Dark + value: PureDielectric_Smooth_Filament_Dark objectReference: {fileID: 0} m_RemovedComponents: [] m_RemovedGameObjects: [] @@ -598,7 +697,7 @@ PrefabInstance: - target: {fileID: 919132149155446097, guid: febf8b50ebcf02f4e9a64c0cc7653e36, type: 3} propertyPath: m_Name - value: PureDiffuse_Rough_Filament_Dark + value: PureDielectric_Rough_Filament_Dark objectReference: {fileID: 0} m_RemovedComponents: [] m_RemovedGameObjects: [] @@ -890,7 +989,7 @@ PrefabInstance: - target: {fileID: 919132149155446097, guid: febf8b50ebcf02f4e9a64c0cc7653e36, type: 3} propertyPath: m_Name - value: PureDiffuse_Rough + value: PureDielectric_Rough objectReference: {fileID: 0} - target: {fileID: 919132149155446097, guid: febf8b50ebcf02f4e9a64c0cc7653e36, type: 3} @@ -908,6 +1007,303 @@ Transform: type: 3} m_PrefabInstance: {fileID: 1009206082} m_PrefabAsset: {fileID: 0} +--- !u!1001 &1076755322 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + serializedVersion: 3 + m_TransformParent: {fileID: 2066529950} + m_Modifications: + - target: {fileID: -8679921383154817045, guid: febf8b50ebcf02f4e9a64c0cc7653e36, + type: 3} + propertyPath: m_LocalScale.x + value: 100 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: febf8b50ebcf02f4e9a64c0cc7653e36, + type: 3} + propertyPath: m_LocalScale.y + value: 100 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: febf8b50ebcf02f4e9a64c0cc7653e36, + type: 3} + propertyPath: m_LocalScale.z + value: 100 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: febf8b50ebcf02f4e9a64c0cc7653e36, + type: 3} + propertyPath: m_LocalPosition.x + value: 2.0650039 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: febf8b50ebcf02f4e9a64c0cc7653e36, + type: 3} + propertyPath: m_LocalPosition.y + value: 0.7837434 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: febf8b50ebcf02f4e9a64c0cc7653e36, + type: 3} + propertyPath: m_LocalPosition.z + value: -8.946353 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: febf8b50ebcf02f4e9a64c0cc7653e36, + type: 3} + propertyPath: m_LocalRotation.w + value: 0.92454123 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: febf8b50ebcf02f4e9a64c0cc7653e36, + type: 3} + propertyPath: m_LocalRotation.x + value: -0.381082 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: febf8b50ebcf02f4e9a64c0cc7653e36, + type: 3} + propertyPath: m_LocalRotation.y + value: 0.0000000074505797 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: febf8b50ebcf02f4e9a64c0cc7653e36, + type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: febf8b50ebcf02f4e9a64c0cc7653e36, + type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: -44.801 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: febf8b50ebcf02f4e9a64c0cc7653e36, + type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: febf8b50ebcf02f4e9a64c0cc7653e36, + type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -7511558181221131132, guid: febf8b50ebcf02f4e9a64c0cc7653e36, + type: 3} + propertyPath: m_ReceiveShadows + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -7511558181221131132, guid: febf8b50ebcf02f4e9a64c0cc7653e36, + type: 3} + propertyPath: m_Materials.Array.data[0] + value: + objectReference: {fileID: 2100000, guid: c858df0a3464b964ebaf1d1493e9a368, type: 2} + - target: {fileID: 919132149155446097, guid: febf8b50ebcf02f4e9a64c0cc7653e36, + type: 3} + propertyPath: m_Name + value: PureDielectric_Rough_Normals_Dark_Filament + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_RemovedGameObjects: [] + m_AddedGameObjects: [] + m_AddedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: febf8b50ebcf02f4e9a64c0cc7653e36, type: 3} +--- !u!4 &1076755323 stripped +Transform: + m_CorrespondingSourceObject: {fileID: -8679921383154817045, guid: febf8b50ebcf02f4e9a64c0cc7653e36, + type: 3} + m_PrefabInstance: {fileID: 1076755322} + m_PrefabAsset: {fileID: 0} +--- !u!1001 &1140422758 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + serializedVersion: 3 + m_TransformParent: {fileID: 2066529950} + m_Modifications: + - target: {fileID: -8679921383154817045, guid: febf8b50ebcf02f4e9a64c0cc7653e36, + type: 3} + propertyPath: m_LocalScale.x + value: 100 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: febf8b50ebcf02f4e9a64c0cc7653e36, + type: 3} + propertyPath: m_LocalScale.y + value: 100 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: febf8b50ebcf02f4e9a64c0cc7653e36, + type: 3} + propertyPath: m_LocalScale.z + value: 100 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: febf8b50ebcf02f4e9a64c0cc7653e36, + type: 3} + propertyPath: m_LocalPosition.x + value: -3.522368 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: febf8b50ebcf02f4e9a64c0cc7653e36, + type: 3} + propertyPath: m_LocalPosition.y + value: 0.77791005 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: febf8b50ebcf02f4e9a64c0cc7653e36, + type: 3} + propertyPath: m_LocalPosition.z + value: -6.3693285 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: febf8b50ebcf02f4e9a64c0cc7653e36, + type: 3} + propertyPath: m_LocalRotation.w + value: 0.92454123 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: febf8b50ebcf02f4e9a64c0cc7653e36, + type: 3} + propertyPath: m_LocalRotation.x + value: -0.381082 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: febf8b50ebcf02f4e9a64c0cc7653e36, + type: 3} + propertyPath: m_LocalRotation.y + value: 0.0000000074505797 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: febf8b50ebcf02f4e9a64c0cc7653e36, + type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: febf8b50ebcf02f4e9a64c0cc7653e36, + type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: -44.801 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: febf8b50ebcf02f4e9a64c0cc7653e36, + type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: febf8b50ebcf02f4e9a64c0cc7653e36, + type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -7511558181221131132, guid: febf8b50ebcf02f4e9a64c0cc7653e36, + type: 3} + propertyPath: m_ReceiveShadows + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -7511558181221131132, guid: febf8b50ebcf02f4e9a64c0cc7653e36, + type: 3} + propertyPath: m_Materials.Array.data[0] + value: + objectReference: {fileID: 2100000, guid: 83e38a6a77fc32f45b4ff8832c9c1785, type: 2} + - target: {fileID: 919132149155446097, guid: febf8b50ebcf02f4e9a64c0cc7653e36, + type: 3} + propertyPath: m_Name + value: PureDielectric_Smooth_Normals_Filament + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_RemovedGameObjects: [] + m_AddedGameObjects: [] + m_AddedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: febf8b50ebcf02f4e9a64c0cc7653e36, type: 3} +--- !u!4 &1140422759 stripped +Transform: + m_CorrespondingSourceObject: {fileID: -8679921383154817045, guid: febf8b50ebcf02f4e9a64c0cc7653e36, + type: 3} + m_PrefabInstance: {fileID: 1140422758} + m_PrefabAsset: {fileID: 0} +--- !u!1001 &1196114152 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + serializedVersion: 3 + m_TransformParent: {fileID: 2066529950} + m_Modifications: + - target: {fileID: -8679921383154817045, guid: febf8b50ebcf02f4e9a64c0cc7653e36, + type: 3} + propertyPath: m_LocalScale.x + value: 100 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: febf8b50ebcf02f4e9a64c0cc7653e36, + type: 3} + propertyPath: m_LocalScale.y + value: 100 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: febf8b50ebcf02f4e9a64c0cc7653e36, + type: 3} + propertyPath: m_LocalScale.z + value: 100 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: febf8b50ebcf02f4e9a64c0cc7653e36, + type: 3} + propertyPath: m_LocalPosition.x + value: -5.581642 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: febf8b50ebcf02f4e9a64c0cc7653e36, + type: 3} + propertyPath: m_LocalPosition.y + value: 0.7793203 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: febf8b50ebcf02f4e9a64c0cc7653e36, + type: 3} + propertyPath: m_LocalPosition.z + value: -8.947155 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: febf8b50ebcf02f4e9a64c0cc7653e36, + type: 3} + propertyPath: m_LocalRotation.w + value: 0.92454123 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: febf8b50ebcf02f4e9a64c0cc7653e36, + type: 3} + propertyPath: m_LocalRotation.x + value: -0.381082 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: febf8b50ebcf02f4e9a64c0cc7653e36, + type: 3} + propertyPath: m_LocalRotation.y + value: 0.0000000074505797 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: febf8b50ebcf02f4e9a64c0cc7653e36, + type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: febf8b50ebcf02f4e9a64c0cc7653e36, + type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: -44.801 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: febf8b50ebcf02f4e9a64c0cc7653e36, + type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: febf8b50ebcf02f4e9a64c0cc7653e36, + type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -7511558181221131132, guid: febf8b50ebcf02f4e9a64c0cc7653e36, + type: 3} + propertyPath: m_Materials.Array.data[0] + value: + objectReference: {fileID: 2100000, guid: 919491364d0bc874e8dec8404eaeab29, type: 2} + - target: {fileID: 919132149155446097, guid: febf8b50ebcf02f4e9a64c0cc7653e36, + type: 3} + propertyPath: m_Name + value: PureDielectric_Smooth_Dark_Normals + objectReference: {fileID: 0} + - target: {fileID: 919132149155446097, guid: febf8b50ebcf02f4e9a64c0cc7653e36, + type: 3} + propertyPath: m_IsActive + value: 1 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_RemovedGameObjects: [] + m_AddedGameObjects: [] + m_AddedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: febf8b50ebcf02f4e9a64c0cc7653e36, type: 3} +--- !u!4 &1196114153 stripped +Transform: + m_CorrespondingSourceObject: {fileID: -8679921383154817045, guid: febf8b50ebcf02f4e9a64c0cc7653e36, + type: 3} + m_PrefabInstance: {fileID: 1196114152} + m_PrefabAsset: {fileID: 0} --- !u!1001 &1289951850 PrefabInstance: m_ObjectHideFlags: 0 @@ -989,7 +1385,7 @@ PrefabInstance: - target: {fileID: 919132149155446097, guid: febf8b50ebcf02f4e9a64c0cc7653e36, type: 3} propertyPath: m_Name - value: PureDiffuse_Smooth_Dark + value: PureDielectric_Smooth_Dark objectReference: {fileID: 0} - target: {fileID: 919132149155446097, guid: febf8b50ebcf02f4e9a64c0cc7653e36, type: 3} @@ -1007,6 +1403,105 @@ Transform: type: 3} m_PrefabInstance: {fileID: 1289951850} m_PrefabAsset: {fileID: 0} +--- !u!1001 &1291187559 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + serializedVersion: 3 + m_TransformParent: {fileID: 2066529950} + m_Modifications: + - target: {fileID: -8679921383154817045, guid: febf8b50ebcf02f4e9a64c0cc7653e36, + type: 3} + propertyPath: m_LocalScale.x + value: 100 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: febf8b50ebcf02f4e9a64c0cc7653e36, + type: 3} + propertyPath: m_LocalScale.y + value: 100 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: febf8b50ebcf02f4e9a64c0cc7653e36, + type: 3} + propertyPath: m_LocalScale.z + value: 100 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: febf8b50ebcf02f4e9a64c0cc7653e36, + type: 3} + propertyPath: m_LocalPosition.x + value: -3.5208178 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: febf8b50ebcf02f4e9a64c0cc7653e36, + type: 3} + propertyPath: m_LocalPosition.y + value: 0.78051984 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: febf8b50ebcf02f4e9a64c0cc7653e36, + type: 3} + propertyPath: m_LocalPosition.z + value: -8.946419 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: febf8b50ebcf02f4e9a64c0cc7653e36, + type: 3} + propertyPath: m_LocalRotation.w + value: 0.92454123 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: febf8b50ebcf02f4e9a64c0cc7653e36, + type: 3} + propertyPath: m_LocalRotation.x + value: -0.381082 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: febf8b50ebcf02f4e9a64c0cc7653e36, + type: 3} + propertyPath: m_LocalRotation.y + value: 0.0000000074505797 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: febf8b50ebcf02f4e9a64c0cc7653e36, + type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: febf8b50ebcf02f4e9a64c0cc7653e36, + type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: -44.801 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: febf8b50ebcf02f4e9a64c0cc7653e36, + type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: febf8b50ebcf02f4e9a64c0cc7653e36, + type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -7511558181221131132, guid: febf8b50ebcf02f4e9a64c0cc7653e36, + type: 3} + propertyPath: m_ReceiveShadows + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -7511558181221131132, guid: febf8b50ebcf02f4e9a64c0cc7653e36, + type: 3} + propertyPath: m_Materials.Array.data[0] + value: + objectReference: {fileID: 2100000, guid: 19171da94f1e4f447899e16b7b7d8f2f, type: 2} + - target: {fileID: 919132149155446097, guid: febf8b50ebcf02f4e9a64c0cc7653e36, + type: 3} + propertyPath: m_Name + value: PureDielectric_Smooth_Dark_Normals_Filament + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_RemovedGameObjects: [] + m_AddedGameObjects: [] + m_AddedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: febf8b50ebcf02f4e9a64c0cc7653e36, type: 3} +--- !u!4 &1291187560 stripped +Transform: + m_CorrespondingSourceObject: {fileID: -8679921383154817045, guid: febf8b50ebcf02f4e9a64c0cc7653e36, + type: 3} + m_PrefabInstance: {fileID: 1291187559} + m_PrefabAsset: {fileID: 0} --- !u!1001 &1517812254 PrefabInstance: m_ObjectHideFlags: 0 @@ -1088,7 +1583,7 @@ PrefabInstance: - target: {fileID: 919132149155446097, guid: febf8b50ebcf02f4e9a64c0cc7653e36, type: 3} propertyPath: m_Name - value: PureDiffuse_Rough_Dark + value: PureDielectric_Rough_Dark objectReference: {fileID: 0} - target: {fileID: 919132149155446097, guid: febf8b50ebcf02f4e9a64c0cc7653e36, type: 3} @@ -1205,6 +1700,105 @@ Transform: type: 3} m_PrefabInstance: {fileID: 1518420704} m_PrefabAsset: {fileID: 0} +--- !u!1001 &1588079857 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + serializedVersion: 3 + m_TransformParent: {fileID: 2066529950} + m_Modifications: + - target: {fileID: -8679921383154817045, guid: febf8b50ebcf02f4e9a64c0cc7653e36, + type: 3} + propertyPath: m_LocalScale.x + value: 100 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: febf8b50ebcf02f4e9a64c0cc7653e36, + type: 3} + propertyPath: m_LocalScale.y + value: 100 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: febf8b50ebcf02f4e9a64c0cc7653e36, + type: 3} + propertyPath: m_LocalScale.z + value: 100 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: febf8b50ebcf02f4e9a64c0cc7653e36, + type: 3} + propertyPath: m_LocalPosition.x + value: -5.5831933 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: febf8b50ebcf02f4e9a64c0cc7653e36, + type: 3} + propertyPath: m_LocalPosition.y + value: 0.7767105 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: febf8b50ebcf02f4e9a64c0cc7653e36, + type: 3} + propertyPath: m_LocalPosition.z + value: -6.370065 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: febf8b50ebcf02f4e9a64c0cc7653e36, + type: 3} + propertyPath: m_LocalRotation.w + value: 0.92454123 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: febf8b50ebcf02f4e9a64c0cc7653e36, + type: 3} + propertyPath: m_LocalRotation.x + value: -0.381082 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: febf8b50ebcf02f4e9a64c0cc7653e36, + type: 3} + propertyPath: m_LocalRotation.y + value: 0.0000000074505797 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: febf8b50ebcf02f4e9a64c0cc7653e36, + type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: febf8b50ebcf02f4e9a64c0cc7653e36, + type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: -44.801 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: febf8b50ebcf02f4e9a64c0cc7653e36, + type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: febf8b50ebcf02f4e9a64c0cc7653e36, + type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -7511558181221131132, guid: febf8b50ebcf02f4e9a64c0cc7653e36, + type: 3} + propertyPath: m_Materials.Array.data[0] + value: + objectReference: {fileID: 2100000, guid: fe859a42fb22a2e49a394044b3911997, type: 2} + - target: {fileID: 919132149155446097, guid: febf8b50ebcf02f4e9a64c0cc7653e36, + type: 3} + propertyPath: m_Name + value: PureDielectric_Smooth_Normals + objectReference: {fileID: 0} + - target: {fileID: 919132149155446097, guid: febf8b50ebcf02f4e9a64c0cc7653e36, + type: 3} + propertyPath: m_IsActive + value: 1 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_RemovedGameObjects: [] + m_AddedGameObjects: [] + m_AddedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: febf8b50ebcf02f4e9a64c0cc7653e36, type: 3} +--- !u!4 &1588079858 stripped +Transform: + m_CorrespondingSourceObject: {fileID: -8679921383154817045, guid: febf8b50ebcf02f4e9a64c0cc7653e36, + type: 3} + m_PrefabInstance: {fileID: 1588079857} + m_PrefabAsset: {fileID: 0} --- !u!1001 &1754030776 PrefabInstance: m_ObjectHideFlags: 0 @@ -1286,7 +1880,7 @@ PrefabInstance: - target: {fileID: 919132149155446097, guid: febf8b50ebcf02f4e9a64c0cc7653e36, type: 3} propertyPath: m_Name - value: PureDiffuse_Smooth + value: PureDielectric_Smooth objectReference: {fileID: 0} - target: {fileID: 919132149155446097, guid: febf8b50ebcf02f4e9a64c0cc7653e36, type: 3} @@ -1390,7 +1984,7 @@ PrefabInstance: - target: {fileID: 919132149155446097, guid: febf8b50ebcf02f4e9a64c0cc7653e36, type: 3} propertyPath: m_Name - value: PureMetal_Smooth_Filament_Dark + value: PureMetal_Smooth_Dark_Filament objectReference: {fileID: 0} m_RemovedComponents: [] m_RemovedGameObjects: [] @@ -1403,6 +1997,105 @@ Transform: type: 3} m_PrefabInstance: {fileID: 1764759768} m_PrefabAsset: {fileID: 0} +--- !u!1001 &1903290997 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + serializedVersion: 3 + m_TransformParent: {fileID: 2066529950} + m_Modifications: + - target: {fileID: -8679921383154817045, guid: febf8b50ebcf02f4e9a64c0cc7653e36, + type: 3} + propertyPath: m_LocalScale.x + value: 100 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: febf8b50ebcf02f4e9a64c0cc7653e36, + type: 3} + propertyPath: m_LocalScale.y + value: 100 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: febf8b50ebcf02f4e9a64c0cc7653e36, + type: 3} + propertyPath: m_LocalScale.z + value: 100 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: febf8b50ebcf02f4e9a64c0cc7653e36, + type: 3} + propertyPath: m_LocalPosition.x + value: 2.0634534 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: febf8b50ebcf02f4e9a64c0cc7653e36, + type: 3} + propertyPath: m_LocalPosition.y + value: 0.7811337 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: febf8b50ebcf02f4e9a64c0cc7653e36, + type: 3} + propertyPath: m_LocalPosition.z + value: -6.3692636 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: febf8b50ebcf02f4e9a64c0cc7653e36, + type: 3} + propertyPath: m_LocalRotation.w + value: 0.92454123 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: febf8b50ebcf02f4e9a64c0cc7653e36, + type: 3} + propertyPath: m_LocalRotation.x + value: -0.381082 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: febf8b50ebcf02f4e9a64c0cc7653e36, + type: 3} + propertyPath: m_LocalRotation.y + value: 0.0000000074505797 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: febf8b50ebcf02f4e9a64c0cc7653e36, + type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: febf8b50ebcf02f4e9a64c0cc7653e36, + type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: -44.801 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: febf8b50ebcf02f4e9a64c0cc7653e36, + type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: febf8b50ebcf02f4e9a64c0cc7653e36, + type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -7511558181221131132, guid: febf8b50ebcf02f4e9a64c0cc7653e36, + type: 3} + propertyPath: m_ReceiveShadows + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -7511558181221131132, guid: febf8b50ebcf02f4e9a64c0cc7653e36, + type: 3} + propertyPath: m_Materials.Array.data[0] + value: + objectReference: {fileID: 2100000, guid: f47e14635c6783c43a3abee62f28f4dc, type: 2} + - target: {fileID: 919132149155446097, guid: febf8b50ebcf02f4e9a64c0cc7653e36, + type: 3} + propertyPath: m_Name + value: PureDielectric_Rough_Normals_Filament + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_RemovedGameObjects: [] + m_AddedGameObjects: [] + m_AddedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: febf8b50ebcf02f4e9a64c0cc7653e36, type: 3} +--- !u!4 &1903290998 stripped +Transform: + m_CorrespondingSourceObject: {fileID: -8679921383154817045, guid: febf8b50ebcf02f4e9a64c0cc7653e36, + type: 3} + m_PrefabInstance: {fileID: 1903290997} + m_PrefabAsset: {fileID: 0} --- !u!1001 &1980416660 PrefabInstance: m_ObjectHideFlags: 0 @@ -1502,6 +2195,105 @@ Transform: type: 3} m_PrefabInstance: {fileID: 1980416660} m_PrefabAsset: {fileID: 0} +--- !u!1001 &1993118160 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + serializedVersion: 3 + m_TransformParent: {fileID: 2066529950} + m_Modifications: + - target: {fileID: -8679921383154817045, guid: febf8b50ebcf02f4e9a64c0cc7653e36, + type: 3} + propertyPath: m_LocalScale.x + value: 100 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: febf8b50ebcf02f4e9a64c0cc7653e36, + type: 3} + propertyPath: m_LocalScale.y + value: 100 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: febf8b50ebcf02f4e9a64c0cc7653e36, + type: 3} + propertyPath: m_LocalScale.z + value: 100 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: febf8b50ebcf02f4e9a64c0cc7653e36, + type: 3} + propertyPath: m_LocalPosition.x + value: 0.0026283786 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: febf8b50ebcf02f4e9a64c0cc7653e36, + type: 3} + propertyPath: m_LocalPosition.y + value: 0.77993405 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: febf8b50ebcf02f4e9a64c0cc7653e36, + type: 3} + propertyPath: m_LocalPosition.z + value: -6.3700004 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: febf8b50ebcf02f4e9a64c0cc7653e36, + type: 3} + propertyPath: m_LocalRotation.w + value: 0.92454123 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: febf8b50ebcf02f4e9a64c0cc7653e36, + type: 3} + propertyPath: m_LocalRotation.x + value: -0.381082 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: febf8b50ebcf02f4e9a64c0cc7653e36, + type: 3} + propertyPath: m_LocalRotation.y + value: 0.0000000074505797 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: febf8b50ebcf02f4e9a64c0cc7653e36, + type: 3} + propertyPath: m_LocalRotation.z + value: -0 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: febf8b50ebcf02f4e9a64c0cc7653e36, + type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: -44.801 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: febf8b50ebcf02f4e9a64c0cc7653e36, + type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -8679921383154817045, guid: febf8b50ebcf02f4e9a64c0cc7653e36, + type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: -7511558181221131132, guid: febf8b50ebcf02f4e9a64c0cc7653e36, + type: 3} + propertyPath: m_Materials.Array.data[0] + value: + objectReference: {fileID: 2100000, guid: c3793cf0eada4094f97f483772eab6fa, type: 2} + - target: {fileID: 919132149155446097, guid: febf8b50ebcf02f4e9a64c0cc7653e36, + type: 3} + propertyPath: m_Name + value: PureDielectric_Rough_Normals + objectReference: {fileID: 0} + - target: {fileID: 919132149155446097, guid: febf8b50ebcf02f4e9a64c0cc7653e36, + type: 3} + propertyPath: m_IsActive + value: 1 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_RemovedGameObjects: [] + m_AddedGameObjects: [] + m_AddedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: febf8b50ebcf02f4e9a64c0cc7653e36, type: 3} +--- !u!4 &1993118161 stripped +Transform: + m_CorrespondingSourceObject: {fileID: -8679921383154817045, guid: febf8b50ebcf02f4e9a64c0cc7653e36, + type: 3} + m_PrefabInstance: {fileID: 1993118160} + m_PrefabAsset: {fileID: 0} --- !u!1001 &2028542692 PrefabInstance: m_ObjectHideFlags: 0 @@ -1601,6 +2393,100 @@ Transform: type: 3} m_PrefabInstance: {fileID: 2028542692} m_PrefabAsset: {fileID: 0} +--- !u!1 &2043101943 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 2043101945} + - component: {fileID: 2043101944} + m_Layer: 0 + m_Name: Point Light + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 0 +--- !u!108 &2043101944 +Light: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2043101943} + m_Enabled: 1 + serializedVersion: 10 + m_Type: 2 + m_Shape: 0 + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_Intensity: 1 + m_Range: 10 + m_SpotAngle: 30 + m_InnerSpotAngle: 21.80208 + m_CookieSize: 10 + m_Shadows: + m_Type: 0 + m_Resolution: -1 + m_CustomResolution: -1 + m_Strength: 1 + m_Bias: 0.05 + m_NormalBias: 0.4 + m_NearPlane: 0.2 + m_CullingMatrixOverride: + e00: 1 + e01: 0 + e02: 0 + e03: 0 + e10: 0 + e11: 1 + e12: 0 + e13: 0 + e20: 0 + e21: 0 + e22: 1 + e23: 0 + e30: 0 + e31: 0 + e32: 0 + e33: 1 + m_UseCullingMatrixOverride: 0 + m_Cookie: {fileID: 0} + m_DrawHalo: 0 + m_Flare: {fileID: 0} + m_RenderMode: 0 + m_CullingMask: + serializedVersion: 2 + m_Bits: 4294967295 + m_RenderingLayerMask: 1 + m_Lightmapping: 4 + m_LightShadowCasterMode: 0 + m_AreaSize: {x: 1, y: 1} + m_BounceIntensity: 1 + m_ColorTemperature: 6570 + m_UseColorTemperature: 0 + m_BoundingSphereOverride: {x: 0, y: 0, z: 0, w: 0} + m_UseBoundingSphereOverride: 0 + m_UseViewFrustumForShadowCasterCull: 1 + m_ShadowRadius: 0 + m_ShadowAngle: 0 +--- !u!4 &2043101945 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2043101943} + serializedVersion: 2 + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: -0.4881, y: 0.3184, z: 0.1745} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 0} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1 &2044805500 GameObject: m_ObjectHideFlags: 0 @@ -1839,6 +2725,14 @@ Transform: - {fileID: 28343426} - {fileID: 1980416661} - {fileID: 1764759769} + - {fileID: 1993118161} + - {fileID: 1903290998} + - {fileID: 1588079858} + - {fileID: 1140422759} + - {fileID: 549781461} + - {fileID: 1076755323} + - {fileID: 1196114153} + - {fileID: 1291187560} m_Father: {fileID: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1001 &2079022851 @@ -1927,7 +2821,7 @@ PrefabInstance: - target: {fileID: 919132149155446097, guid: febf8b50ebcf02f4e9a64c0cc7653e36, type: 3} propertyPath: m_Name - value: PureDiffuse_Smooth_Filament + value: PureDielectric_Smooth_Filament objectReference: {fileID: 0} m_RemovedComponents: [] m_RemovedGameObjects: [] @@ -1990,5 +2884,6 @@ SceneRoots: m_Roots: - {fileID: 457145524} - {fileID: 2044805502} + - {fileID: 2043101945} - {fileID: 2089719961} - {fileID: 2066529950} diff --git a/features.cginc b/features.cginc index c586f4a..ab02784 100644 --- a/features.cginc +++ b/features.cginc @@ -2,10 +2,13 @@ #define __FEATURES_INC //ifex _Wrapped_Lighting_Enabled==0 -#pragma shader_feature _WRAPPED_LIGHTING +#pragma shader_feature_local _WRAPPED_LIGHTING //endex -//ifex _Outline_Mask_Enabled==1 -#pragma shader_feature _OUTLINE_MASK +//ifex _Outline_Mask_Enabled==0 +#pragma shader_feature_local _OUTLINE_MASK +//endex +//ifex _Bump_Shadows_Enabled==0 +#pragma shader_feature_local _BUMP_SHADOWS //endex #endif // __FEATURES_INC diff --git a/filamented.cginc b/filamented.cginc index 2b1e876..b2f2ddb 100644 --- a/filamented.cginc +++ b/filamented.cginc @@ -389,5 +389,94 @@ inline half3 UnityGI_prefilteredRadiance(const UnityGIInput data, return specular; } +// R dither mask +float noiseR2(float2 pixel) { + const float a1 = 0.75487766624669276; + const float a2 = 0.569840290998; + return frac(a1 * float(pixel.x) + a2 * float(pixel.y)); +} + +#if defined(_BUMP_SHADOWS) +struct NormalMapShadowsParam +{ + float4 uv; + float2 dX; + float2 dY; +}; + +NormalMapShadowsParam InitNormalMapShadowsParam(float4 uv) +{ + NormalMapShadowsParam nms; + + nms.uv = uv; + nms.dX = ddx(uv.xy); + nms.dY = ddy(uv.xy); + + return nms; +} + +// Ref: Normal Mapping Shadows by Boris Vorontsov +// Please define a NormalMapShadowsParam parameter +// and SampleNormalMap function to sample the normal map. +float NormalMapShadows (float3 lightDirTangent, NormalMapShadowsParam nmsParam, float noise, + float heightScale, float shadowHardness) +{ + const float screenShadowSamples = 20; + const float hardness = heightScale * shadowHardness; + const float sampleStep = 1.0 / screenShadowSamples; + + float2 dir = lightDirTangent.xy * heightScale; + + // Redundancy can't be helped + float3 normal = UnpackScaleNormal(tex2D(_BumpMap, nmsParam.uv), _BumpScale); + + lightDirTangent = normalize(lightDirTangent); + float tangentNdotL = saturate(dot(lightDirTangent, normal)); + + float currentSample = sampleStep - sampleStep * noise; + + // Skip on backfaces + currentSample += (tangentNdotL <= 0.0); + + /* + From the PDF: + Trace from hit point to light direction and compute sum of dot products + between normal map and light direction. + If slope is bigger than 0, pixel is shadowed. If slope is also bigger + than previous maximal value, increase hardness of shadow. + */ + + float result = 0; + float slope = -tangentNdotL; + float maxslope = 0.0; + for (uint i = 0; i < 1; i++) + { + normal = UnpackScaleNormal(tex2D(_BumpMap, nmsParam.uv + dir * currentSample), _BumpScale); + tangentNdotL = dot(lightDirTangent, normal); + slope = slope - tangentNdotL; + if (slope > maxslope) + { + result += hardness * (1.0-currentSample); + } + maxslope = max(maxslope, slope); + currentSample += sampleStep; + if (currentSample <= 1.0) { + break; + } + } + + return result * sampleStep; +} + +float NormalTangentShadow(float4 texcoords, half3 lightDirTS, float noise) +{ + float _HeightScale = _BumpShadowHeightScale; + float _ShadowHardness = _BumpShadowHardness; + NormalMapShadowsParam nms = InitNormalMapShadowsParam(texcoords); + nms.uv = texcoords; + return NormalMapShadows(lightDirTS, nms, noise, _HeightScale, _ShadowHardness); +} +#endif // _BUMP_SHADOWS + #endif diff --git a/globals.cginc b/globals.cginc index b92dbbe..5ca95a8 100644 --- a/globals.cginc +++ b/globals.cginc @@ -8,7 +8,9 @@ float4 _MainTex_ST; fixed4 _Color;
sampler2D _BumpMap;
-float _BumpScale;
+half _BumpScale;
+float _BumpShadowHeightScale;
+float _BumpShadowHardness;
sampler2D _OcclusionMap;
float _OcclusionStrength;
diff --git a/interpolators.cginc b/interpolators.cginc index 56b5f60..1b3abc5 100644 --- a/interpolators.cginc +++ b/interpolators.cginc @@ -4,24 +4,24 @@ #include "AutoLight.cginc"
struct appdata {
- float4 vertex : POSITION;
- float2 uv : TEXCOORD0;
- float2 uv1 : TEXCOORD1;
- float3 normal : NORMAL;
+ float4 vertex : POSITION;
+ float4 uv01 : TEXCOORD0; // uv channels 0:1
+ float3 normal : NORMAL;
float4 tangent : TANGENT;
UNITY_VERTEX_INPUT_INSTANCE_ID
};
struct v2f {
- float4 pos : SV_POSITION;
- float2 uv : TEXCOORD0;
- float3 worldPos : TEXCOORD1;
- float3 normal : TEXCOORD2;
- float3 tangent : TEXCOORD3;
- float3 bitangent : TEXCOORD4;
- float4 eyeVec : TEXCOORD5; // eyeVec.xyz | fogCoord
+ float4 pos : SV_POSITION;
+ float4 uv01 : TEXCOORD0;
+ float3 worldPos : TEXCOORD1;
+ float3 normal : TEXCOORD2;
+ float3 tangent : TEXCOORD3;
+ float3 binormal : TEXCOORD4;
+ float4 eyeVec : TEXCOORD5; // eyeVec.xyz | fogCoord
UNITY_LIGHTING_COORDS(6,7)
+ float3 lightDirTS : TEXCOORD8;
UNITY_VERTEX_INPUT_INSTANCE_ID
UNITY_VERTEX_OUTPUT_STEREO
diff --git a/yum_lighting.cginc b/yum_lighting.cginc index ecbc2da..6cca5e2 100644 --- a/yum_lighting.cginc +++ b/yum_lighting.cginc @@ -4,6 +4,7 @@ #include "UnityCG.cginc"
#include "AutoLight.cginc"
#include "UnityPBSLighting.cginc"
+#include "UnityLightingCommon.cginc"
#include "yum_pbr.cginc"
@@ -103,7 +104,8 @@ float4 getIndirectDiffuse(v2f i, float4 vertexLightColor) { YumLighting GetYumLighting(v2f i, YumPbr pbr) {
YumLighting light;
- light.view_dir = normalize(_WorldSpaceCameraPos - i.worldPos);
+ // normalize has no visibile impact in test scene
+ light.view_dir = -i.eyeVec.xyz;
#if defined(POINT) || defined(POINT_COOKIE) || defined(SPOT)
light.dir = normalize((_WorldSpaceLightPos0 - i.worldPos).xyz);
@@ -123,13 +125,18 @@ YumLighting GetYumLighting(v2f i, YumPbr pbr) { light.specular = getIndirectSpecular(i, pbr, light.view_dir);
- light.NoL = saturate(dot(i.normal, light.dir));
+ light.NoL = saturate(dot(pbr.normal, light.dir));
#if defined(_WRAPPED_LIGHTING)
light.NoL_wrapped_s = wrapNoL(light.NoL, _Wrap_NoL_Specular_Strength);
light.NoL_wrapped_d = wrapNoL(light.NoL, _Wrap_NoL_Diffuse_Strength);
#endif
light.attenuation = getShadowAttenuation(i);
+#if defined(_BUMP_SHADOWS)
+ float noise = noiseR2(i.pos.xy);
+ float nm_shade = NormalTangentShadow(i.uv01, i.lightDirTS, noise);
+ light.attenuation = min(light.attenuation, max(1-nm_shade, 0));
+#endif
return light;
}
diff --git a/yum_pbr.cginc b/yum_pbr.cginc index f89d865..8b4d8e3 100644 --- a/yum_pbr.cginc +++ b/yum_pbr.cginc @@ -19,13 +19,13 @@ YumPbr GetYumPbr(v2f i) { #if defined(OUTLINE_PASS) result.albedo = _Outline_Color; - result.albedo.a *= tex2D(_MainTex, i.uv).a; + result.albedo.a *= tex2D(_MainTex, i.uv01).a; #else - result.albedo = tex2D(_MainTex, i.uv) * _Color; + result.albedo = tex2D(_MainTex, i.uv01) * _Color; #endif - float3 normal_raw = UnpackScaleNormal(tex2D(_BumpMap, i.uv), _BumpScale); - float3x3 tangentToWorld = float3x3(i.tangent, i.bitangent, i.normal); + float3 normal_raw = UnpackScaleNormal(tex2D(_BumpMap, i.uv01), _BumpScale); + float3x3 tangentToWorld = float3x3(i.tangent, i.binormal, i.normal); result.normal = normalize(mul(normal_raw, tangentToWorld)); result.smoothness = _Smoothness; @@ -35,7 +35,7 @@ YumPbr GetYumPbr(v2f i) { result.metallic = _Metallic; - result.ao = lerp(1, tex2D(_OcclusionMap, i.uv), _OcclusionStrength); + result.ao = lerp(1, tex2D(_OcclusionMap, i.uv01), _OcclusionStrength); return result; } |
