feat: Main shader LOD detail map
This commit is contained in:
@@ -55,7 +55,7 @@ Material:
|
||||
- _QueueControl: 0
|
||||
- _QueueOffset: 0
|
||||
m_Colors:
|
||||
- _ColorA: {r: 1.244819, g: 0.500609, b: 0.2289997, a: 1}
|
||||
- _ColorA: {r: 1.4980392, g: 0.6024425, b: 0.27558267, a: 1}
|
||||
- _ColorB: {r: 0.7924528, g: 0.2773978, b: 0.09344961, a: 1}
|
||||
m_BuildTextureStacks: []
|
||||
m_AllowLocking: 1
|
||||
|
||||
@@ -28,25 +28,30 @@ void Fog_float
|
||||
//float test = RidgedNoise3D(PositionWS, 10, 2, 2, .5);
|
||||
float3 camPos = _WorldSpaceCameraPos.xyz;
|
||||
float depth = distance(camPos, PositionWS);
|
||||
float depthAtten = smoothstep(10, 100, depth);
|
||||
float depthAtten = smoothstep(5, 30, depth);
|
||||
|
||||
float mask = smoothstep(0, lerp(.3, .1, depthAtten), PositionOS.y) * pow(smoothstep(1, .5, PositionOS.y), 2);
|
||||
|
||||
float t = _Time.y * .7;
|
||||
float s = lerp(Scale.x, 1, .3);
|
||||
|
||||
|
||||
float3 p = PositionWS;// - PivotWS;
|
||||
p += float3(t, t * .2, t);
|
||||
p += RidgedNoise3D(p - PivotWS * .9, .1, 3, 1.6, 1) * 3;
|
||||
|
||||
float noise = RidgedNoise3D(p - PivotWS * .9, .1, 5, 1.6, 1);
|
||||
|
||||
p += noise * 3;
|
||||
|
||||
float fog = FBMNoise3D((p - PivotWS * .5), 10 / s, 3, 1.5, .5);
|
||||
|
||||
float4 col = lerp(ColorA, ColorB, saturate(RidgedNoise3D((p - PivotWS * .7) * float3(1, 1.6, 1), 3 / s, 3, 1.6, 1)));
|
||||
float4 col = lerp(ColorA, ColorB, saturate(RidgedNoise3D((p - PivotWS * .9) * float3(1, 1.6, 1), 3 / s, 3, 1.6, 1)));
|
||||
|
||||
float mask = smoothstep(0, lerp(.3, .1, depthAtten), PositionOS.y) * pow(smoothstep(1, .5, PositionOS.y - .15 + noise * .3), 2);
|
||||
|
||||
// Output
|
||||
|
||||
Output = col.rgb;
|
||||
Alpha = lerp(fog, smoothstep(1, .5, PositionOS.y), depthAtten * mask) * lerp(.2, 1, smoothstep(0, 30, depth)) * mask * col.a;
|
||||
Alpha = lerp(fog, smoothstep(1, .5, PositionOS.y), depthAtten * mask) * lerp(.2, 1, smoothstep(0, 15, depth)) * mask * col.a;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,75 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &-5120607745848675954
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 11
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
version: 10
|
||||
--- !u!21 &2100000
|
||||
Material:
|
||||
serializedVersion: 8
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: M_ray_Omnissiah
|
||||
m_Shader: {fileID: -6465566751694194690, guid: 41e1af50dce5647448137abb3f85e49b, type: 3}
|
||||
m_Parent: {fileID: 0}
|
||||
m_ModifiedSerializedProperties: 0
|
||||
m_ValidKeywords: []
|
||||
m_InvalidKeywords: []
|
||||
m_LightmapFlags: 4
|
||||
m_EnableInstancingVariants: 1
|
||||
m_DoubleSidedGI: 0
|
||||
m_CustomRenderQueue: 3000
|
||||
stringTagMap: {}
|
||||
disabledShaderPasses:
|
||||
- MOTIONVECTORS
|
||||
m_LockedProperties:
|
||||
m_SavedProperties:
|
||||
serializedVersion: 3
|
||||
m_TexEnvs:
|
||||
- _SampleTexture2D_45427f0cc3994257be048fc580e65bba_Texture_1_Texture2D:
|
||||
m_Texture: {fileID: 2800000, guid: dffef66376be4fa480fb02b19edbe903, type: 3}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- unity_Lightmaps:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- unity_LightmapsInd:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- unity_ShadowMasks:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_Ints: []
|
||||
m_Floats:
|
||||
- _Debug: 0
|
||||
- _Demo: 0
|
||||
- _IgnoreAtten: 1
|
||||
- _Intendity: 0.828
|
||||
- _Intensity: 1
|
||||
- _Noise: 0.786
|
||||
- _QueueControl: 0
|
||||
- _QueueOffset: 0
|
||||
- _Size: 3.92
|
||||
- _Speed: 2
|
||||
- _Stop: 1
|
||||
- _UV: 0
|
||||
m_Colors:
|
||||
- _Color: {r: 10.556064, g: 0, b: 0.17448205, a: 0.105882354}
|
||||
- _Direction: {r: 0, g: 0, b: 1, a: 0}
|
||||
- _Size: {r: 3, g: 1, b: 0, a: 0}
|
||||
m_BuildTextureStacks: []
|
||||
m_AllowLocking: 1
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 2f0a42f4b97d23e4599d257dabb0f97d
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 2100000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user