feat: Omnissiah fog
This commit is contained in:
Binary file not shown.
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 6c6e37803c0c12643a1318245d7536ec
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,52 @@
|
||||
#ifndef FOG_INCLUDED
|
||||
#define FOG_INCLUDED
|
||||
|
||||
#include "Assets/_Content/Shaders/Include/Noises.hlsl"
|
||||
|
||||
void Fog_float
|
||||
(
|
||||
float4 ColorA,
|
||||
float4 ColorB,
|
||||
float3 PositionWS,
|
||||
float3 PositionOS,
|
||||
float3 PivotWS,
|
||||
float3 Scale,
|
||||
out float3 Output,
|
||||
out float Alpha
|
||||
)
|
||||
{
|
||||
// Test
|
||||
|
||||
//float test = ValueNoise3D(PositionWS, 40);
|
||||
//float test = PerlinNoise3D(PositionWS, 40);
|
||||
//float test = PerlinNoise3DLOD(PositionWS, 100, 3.5);
|
||||
//float test = SimplexNoise3D(PositionWS, 40);
|
||||
//float test = WorleyNoise3D(PositionWS, 40, 1);
|
||||
//float id;
|
||||
//float test = VoronoiNoise3D(PositionWS, 10, 1, .05, id);
|
||||
//float test = FBMNoise3D(PositionWS, 10, 2, 2, .5);
|
||||
//float test = RidgedNoise3D(PositionWS, 10, 2, 2, .5);
|
||||
float3 camPos = _WorldSpaceCameraPos.xyz;
|
||||
float depth = distance(camPos, PositionWS);
|
||||
float depthAtten = smoothstep(10, 100, 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 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)));
|
||||
|
||||
// Output
|
||||
|
||||
Output = col.rgb;
|
||||
Alpha = lerp(fog, smoothstep(1, .5, PositionOS.y), depthAtten * mask) * lerp(.2, 1, smoothstep(0, 30, depth)) * mask * col.a;
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 2743e5676f48592459e53e963742a697
|
||||
ShaderIncludeImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,18 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 0f1522c6af8cc4d47a4bbc5401f58523
|
||||
ScriptedImporter:
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
script: {fileID: 11500000, guid: 625f186215c104763be7675aa2d941aa, type: 3}
|
||||
useAsTemplate: 0
|
||||
exposeTemplateAsShader: 0
|
||||
template:
|
||||
name:
|
||||
category:
|
||||
description:
|
||||
icon: {instanceID: 0}
|
||||
thumbnail: {instanceID: 0}
|
||||
Reference in New Issue
Block a user