Unified Volumetric Flow
Modified stardust & nebula shaders such that flow velocity is consistent: Volumetric:flow now represents global velocity in meters per second
This commit is contained in:
parent
424010584c
commit
c3329cecc4
19 changed files with 527 additions and 67 deletions
|
|
@ -43,7 +43,7 @@ public class FlowSettings
|
|||
[JsonProperty("scale"), Key(0)] public float Scale;
|
||||
[JsonProperty("amplitude"), Key(1)] public float Amplitude;
|
||||
[JsonProperty("scrollSpeed"), Key(2)] public float ScrollSpeed;
|
||||
[JsonProperty("velocity"), Key(3)] public float Speed;
|
||||
[JsonProperty("period"), Key(3)] public float Period;
|
||||
}
|
||||
|
||||
[Serializable, MessagePackObject, JsonObject(MemberSerialization.OptIn)]
|
||||
|
|
|
|||
|
|
@ -110,7 +110,7 @@ public class VolumeCloudRenderer : EffectBase
|
|||
|
||||
/* Some code is from playdead TAA. */
|
||||
|
||||
//1. Pass1, Render a undersampled buffer. The buffer is dithered using bayer matrix(every 3x3 pixel) and halton sequence.
|
||||
//1. Pass1, Render a undersampled buffer. The buffer is dithered using blue noise and halton sequence.
|
||||
//If it's first frame, force a high quality sample to make the initial history buffer good enough.
|
||||
if (firstFrame || quality == Quality.Ultra) {
|
||||
mat.EnableKeyword("ULTRA_QUALITY");
|
||||
|
|
|
|||
|
|
@ -67,6 +67,6 @@ public class VolumeSampling : MonoBehaviour
|
|||
Shader.SetGlobalFloat("_FlowAmplitude", Settings.DefaultEnvironment.Flow.Amplitude);
|
||||
_flowScroll += Settings.DefaultEnvironment.Flow.ScrollSpeed * Time.deltaTime;
|
||||
Shader.SetGlobalFloat("_FlowScroll", _flowScroll);
|
||||
Shader.SetGlobalFloat("_FlowSpeed", Settings.DefaultEnvironment.Flow.Speed);
|
||||
Shader.SetGlobalFloat("_FlowPeriod", Settings.DefaultEnvironment.Flow.Period);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue