More Cloud Tweaking

This commit is contained in:
Reinier Vens 2021-06-01 10:59:45 +01:00
commit eebca2e276
8 changed files with 107 additions and 23 deletions

View file

@ -58,7 +58,7 @@ Material:
m_Floats:
- _BumpScale: 1
- _Cutoff: 1
- _Depth: 10
- _Depth: 3
- _DetailNormalMapScale: 1
- _DstBlend: 0
- _Frequency: 6.2832

View file

@ -0,0 +1,73 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Fog Marching 1
m_Shader: {fileID: 4800000, guid: 7a890b6ceccf53c44bfc54b18b5daa58, type: 3}
m_ShaderKeywords:
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses: []
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _Displacement:
m_Texture: {fileID: 8400000, guid: 06ec5ef8a5830fc44b1ac1a6e123add5, type: 2}
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}
- _Patch:
m_Texture: {fileID: 8400000, guid: c618a6b20b3c7394590c59a9fa467e86, type: 2}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _Surface:
m_Texture: {fileID: 8400000, guid: 2fc21a9d3e9647948b56e384cd9378b3, type: 2}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _TintTexture:
m_Texture: {fileID: 8400000, guid: d196505464047f04a97f28689041209b, type: 2}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Floats:
- _AlphaFloor: 0.01
- _DepthBlend: 512
- _DepthCeiling: 4096
- _FlowSpeed: 2
- _Gamma: 0.5
- _GridCeilingBlend: -300
- _GridCeilingDensity: 0.01
- _GridCeilingFollow: 0
- _GridCeilingOffset: 0
- _GridFillDensity: 0.001
- _GridFloorBlend: 100
- _GridFloorDensity: 2
- _GridFloorOffset: 20
- _GridPatchBlend: 50
- _GridPatchDensity: 2
- _NoiseExponent: 2.25
- _NoiseFrequency: 0.015
- _NoiseSpeed: 0
- _NoiseStrength: 500
- _SafetyDistance: 20
- _Scattering: 0
- _ScatteringDensityExponent: 0.5
- _ScatteringDistExponent: 0.5
- _ScatteringMinDist: 500
- _StepExponent: 2
- _TintExponent: 0.1
- _TurbulenceAmplitude: 100
- _TurbulenceScale: 100
m_Colors:
- _Tint: {r: 0.0627451, g: 0.0627451, b: 0.0627451, a: 1}
m_BuildTextureStacks: []

View file

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: a72896cb7097bfa46a1a8f4092e47c72
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 2100000
userData:
assetBundleName:
assetBundleVariant:

View file

@ -43,31 +43,32 @@ Material:
- _AlphaFloor: 0.01
- _DepthBlend: 512
- _DepthCeiling: 4096
- _FlowSpeed: 2
- _Exposure: 0.001
- _FlowSpeed: 5
- _Gamma: 0.5
- _GridCeilingBlend: -300
- _GridCeilingDensity: 0.01
- _GridCeilingFollow: 0
- _GridCeilingOffset: 0
- _GridFillDensity: 0.0025
- _GridFloorBlend: 100
- _GridFillDensity: 0.0005
- _GridFloorBlend: 50
- _GridFloorDensity: 2
- _GridFloorOffset: 22.8
- _GridPatchBlend: 30
- _GridPatchDensity: 0.25
- _NoiseExponent: 1
- _NoiseFrequency: 0.01
- _GridFloorOffset: 10
- _GridPatchBlend: 150
- _GridPatchDensity: 2
- _NoiseExponent: 2.25
- _NoiseFrequency: 0.02
- _NoiseSpeed: 0
- _NoiseStrength: 100
- _SafetyDistance: 40
- _Scattering: 0
- _ScatteringDensityExponent: 0.5
- _ScatteringDistExponent: 0.5
- _ScatteringMinDist: 500
- _NoiseStrength: 50
- _SafetyDistance: 100
- _Scattering: 100
- _ScatteringDensityExponent: 0.175
- _ScatteringDistExponent: 2
- _ScatteringMinDist: 50
- _StepExponent: 2
- _TintExponent: 1.5
- _TintExponent: 2
- _TurbulenceAmplitude: 100
- _TurbulenceScale: 100
- _TurbulenceScale: 30
m_Colors:
- _Tint: {r: 0.0014705883, g: 0.0014705883, b: 0.0014705883, a: 1}
- _Tint: {r: 0.01, g: 0.01, b: 0.01, a: 1}
m_BuildTextureStacks: []

View file

@ -86,7 +86,7 @@ Material:
- _Mode: 0
- _OcclusionStrength: 1
- _Parallax: 0.02
- _Scale: 5.0237036
- _Scale: 2.6751254
- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 1

View file

@ -14,6 +14,7 @@
_GridFloorOffset("Floor Offset", float) = 1
_GridFloorBlend("Floor Blend", float) = 1
_GridPatchBlend("Patch Blend", float) = 1
_Exposure("Exposure", float) = 1
_Gamma("Gamma", float) = .5
_TintExponent("Tint Exponent", float) = .5
_DepthCeiling("Depth Ceiling", float) = 1000
@ -56,6 +57,7 @@
uniform float _StepExponent;
uniform half _Gamma,
_Exposure,
_DepthCeiling,
_DepthBlend,
_Scattering,
@ -109,7 +111,7 @@
RaymarchStep( origin + rayDist * direction, step, 1-rayDist/_DepthCeiling, sum, _Scattering/pow(max(rayDist,_ScatteringMinDist),_ScatteringDistExponent), scatterSum);
}
sum.rgb = pow( sum.rgb, 1 / _Gamma );
sum.rgb = pow( sum.rgb, 1 / _Gamma ) * _Exposure;
return sum;
}

View file

@ -155,7 +155,7 @@ float3 flow(float3 pos, out float3 normal)
normal = calcNormal(pos);
//return normalize(float3(-normal.x,0,-normal.z)) * _TurbulenceAmplitude;
const float4 simplex = Value3D_Deriv( pos / _TurbulenceScale - float3(0,_Time.x,0) );
return cross(normalize(simplex.yzw), normal) * _TurbulenceAmplitude * simplex.x;
return cross(normalize(simplex.yzw), normal) * _TurbulenceAmplitude * (simplex.x-.5);
}
float d(float3 pos, out float3 normal)
@ -177,7 +177,7 @@ float4 VolumeSampleColor(float3 pos)
float3 tint = tex2Dlod(_TintTexture, float4(uv.x, uv.y, 0, 1 / pow(density, .25)));
//float2 tintGrad = tintGradient(pos, uv, 1 / pow(density, .25), tint);
//float3 tintNormal = normalize(float3(tintGrad.x, 0, tintGrad.y));
tint *= max(0, dot(normal, float3(0,-1,0)));
//tint *= abs(dot(normal, float3(0,-1,0)));
const float albedo = pow(1/max(.01,density), _TintExponent) * smoothstep(0,-250,pos.y);
return float4(albedo*_Tint.rgb*tint, density);
}

BIN
GameData/PlayerSettings.msgpack (Stored with Git LFS)

Binary file not shown.