Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,7 @@ class VolumetricCloudsEditor : VolumeComponentEditor
SerializedDataParameter m_DensityMultiplier;
SerializedDataParameter m_ShapeFactor;
SerializedDataParameter m_ShapeScale;
SerializedDataParameter m_ShapeOffsetX;
SerializedDataParameter m_ShapeOffsetY;
SerializedDataParameter m_ShapeOffsetZ;
SerializedDataParameter m_ShapeOffset;
SerializedDataParameter m_ErosionFactor;
SerializedDataParameter m_ErosionScale;
SerializedDataParameter m_ErosionNoiseType;
Expand Down Expand Up @@ -126,9 +124,7 @@ public override void OnEnable()
m_DensityMultiplier = Unpack(o.Find(x => x.densityMultiplier));
m_ShapeFactor = Unpack(o.Find(x => x.shapeFactor));
m_ShapeScale = Unpack(o.Find(x => x.shapeScale));
m_ShapeOffsetX = Unpack(o.Find(x => x.shapeOffsetX));
m_ShapeOffsetY = Unpack(o.Find(x => x.shapeOffsetY));
m_ShapeOffsetZ = Unpack(o.Find(x => x.shapeOffsetZ));
m_ShapeOffset = Unpack(o.Find(x => x.shapeOffset));
m_ErosionFactor = Unpack(o.Find(x => x.erosionFactor));
m_ErosionScale = Unpack(o.Find(x => x.erosionScale));
m_ErosionNoiseType = Unpack(o.Find(x => x.erosionNoiseType));
Expand Down Expand Up @@ -234,9 +230,7 @@ public override void OnInspectorGUI()
}
PropertyField(m_ShapeFactor);
PropertyField(m_ShapeScale);
PropertyField(m_ShapeOffsetX);
PropertyField(m_ShapeOffsetY);
PropertyField(m_ShapeOffsetZ);
PropertyField(m_ShapeOffset);
PropertyField(m_ErosionFactor);
PropertyField(m_ErosionScale);
PropertyField(m_ErosionNoiseType);
Expand All @@ -248,11 +242,7 @@ public override void OnInspectorGUI()
}
}
else
{
PropertyField(m_ShapeOffsetX);
PropertyField(m_ShapeOffsetY);
PropertyField(m_ShapeOffsetZ);
}
PropertyField(m_ShapeOffset);
}

PropertyField(m_EarthCurvature);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -439,8 +439,8 @@ void UpdateShaderVariableslClouds(ref ShaderVariablesClouds cb, HDCamera hdCamer
cb._ShapeScale = cloudModelData.shapeScale;
cb._ErosionFactor = cloudModelData.erosionFactor;
cb._ErosionScale = cloudModelData.erosionScale;
cb._ShapeNoiseOffset = new Vector2(settings.shapeOffsetX.value, settings.shapeOffsetZ.value);
cb._VerticalShapeNoiseOffset = settings.shapeOffsetY.value;
cb._ShapeNoiseOffset = new Vector2(settings.shapeOffset.value.x, settings.shapeOffset.value.z);
cb._VerticalShapeNoiseOffset = settings.shapeOffset.value.y;

// If the sun has moved more than 2.0°, reduce significantly the history accumulation
float sunAngleDifference = 0.0f;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ enum Version
{
Initial,
GlobalWind,
ShapeOffset,

Count
}
Expand All @@ -44,6 +45,13 @@ enum Version
mode = WindParameter.WindOverrideMode.Custom,
customValue = c.m_ObsoleteOrientation.value
};
#pragma warning restore 618
}),
MigrationStep.New(Version.ShapeOffset, (VolumetricClouds c) =>
{
#pragma warning disable 618 // Type or member is obsolete
c.shapeOffset.overrideState = c.m_ObsoleteShapeOffsetX.overrideState || c.m_ObsoleteShapeOffsetY.overrideState || c.m_ObsoleteShapeOffsetZ.overrideState;
c.shapeOffset.value = new Vector3(c.m_ObsoleteShapeOffsetX.value, c.m_ObsoleteShapeOffsetY.value, c.m_ObsoleteShapeOffsetZ.value);
#pragma warning restore 618
})
);
Expand All @@ -61,5 +69,13 @@ void Awake()
MinFloatParameter m_ObsoleteWindSpeed = new MinFloatParameter(1.0f, 0.0f);
[SerializeField, FormerlySerializedAs("orientation"), Obsolete("For Data Migration")]
ClampedFloatParameter m_ObsoleteOrientation = new ClampedFloatParameter(0.0f, 0.0f, 360.0f);

[SerializeField, FormerlySerializedAs("shapeOffsetX"), Obsolete("For Data Migration")]
FloatParameter m_ObsoleteShapeOffsetX = new FloatParameter(0.0f);
[SerializeField, FormerlySerializedAs("shapeOffsetY"), Obsolete("For Data Migration")]
FloatParameter m_ObsoleteShapeOffsetY = new FloatParameter(0.0f);
[SerializeField, FormerlySerializedAs("shapeOffsetZ"), Obsolete("For Data Migration")]
FloatParameter m_ObsoleteShapeOffsetZ = new FloatParameter(0.0f);

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -379,22 +379,10 @@ public CloudFadeInModeParameter(CloudFadeInMode value, bool overrideState = fals
public MinFloatParameter shapeScale = new MinFloatParameter(2.5f, 0.1f);

/// <summary>
/// Controls the offset (world X-axis) applied when evaluating the larger noise passing through the cloud coverage.
/// Controls the world space offset applied when evaluating the larger noise passing through the cloud coverage.
/// </summary>
[Tooltip("Controls the offset (world X-axis) applied when evaluating the larger noise passing through the cloud coverage.")]
public FloatParameter shapeOffsetX = new FloatParameter(0.0f);

/// <summary>
/// Controls the offset (world Y-axis) applied when evaluating the larger noise passing through the cloud coverage.
/// </summary>
[Tooltip("Controls the offset (world Y-axis) applied when evaluating the larger noise passing through the cloud coverage.")]
public FloatParameter shapeOffsetY = new FloatParameter(0.0f);

/// <summary>
/// Controls the offset (world Z-axis) applied when evaluating the larger noise passing through the cloud coverage.
/// </summary>
[Tooltip("Controls the offset (world Z-axis) applied when evaluating the larger noise passing through the cloud coverage.")]
public FloatParameter shapeOffsetZ = new FloatParameter(0.0f);
[Tooltip("Controls the world space offset applied when evaluating the larger noise passing through the cloud coverage.")]
public Vector3Parameter shapeOffset = new Vector3Parameter(Vector3.zero);

/// <summary>
/// Controls the smaller noise on the edge of the clouds. A higher value will erode clouds more significantly.
Expand Down