Skip to content
Merged
Show file tree
Hide file tree
Changes from 5 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
104 changes: 104 additions & 0 deletions com.unity.render-pipelines.core/Runtime/Volume/VolumeParameter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1449,6 +1449,19 @@ public TextureParameter(Texture value, bool overrideState = false)
: base(value, overrideState) { }

// TODO: Texture interpolation

public override int GetHashCode()
{
int hash = base.GetHashCode();

unchecked
{
if (value != null)
hash = 23 * CoreUtils.GetTextureHash(value);
}

return hash;
}
}

/// <summary>
Expand All @@ -1464,6 +1477,19 @@ public class NoInterpTextureParameter : VolumeParameter<Texture>
/// <param name="overrideState">The initial override state for the parameter.</param>
public NoInterpTextureParameter(Texture value, bool overrideState = false)
: base(value, overrideState) { }

public override int GetHashCode()
{
int hash = base.GetHashCode();

unchecked
{
if (value != null)
hash = 23 * CoreUtils.GetTextureHash(value);
}

return hash;
}
}

/// <summary>
Expand All @@ -1479,6 +1505,19 @@ public class Texture2DParameter : VolumeParameter<Texture>
/// <param name="overrideState">The initial override state for the parameter.</param>
public Texture2DParameter(Texture value, bool overrideState = false)
: base(value, overrideState) { }

public override int GetHashCode()
{
int hash = base.GetHashCode();

unchecked
{
if (value != null)
hash = 23 * CoreUtils.GetTextureHash(value);
}

return hash;
}
}

/// <summary>
Expand All @@ -1494,6 +1533,19 @@ public class Texture3DParameter : VolumeParameter<Texture>
/// <param name="overrideState">The initial override state for the parameter.</param>
public Texture3DParameter(Texture value, bool overrideState = false)
: base(value, overrideState) { }

public override int GetHashCode()
{
int hash = base.GetHashCode();

unchecked
{
if (value != null)
hash = 23 * CoreUtils.GetTextureHash(value);
}

return hash;
}
}

/// <summary>
Expand All @@ -1511,6 +1563,19 @@ public RenderTextureParameter(RenderTexture value, bool overrideState = false)
: base(value, overrideState) { }

// TODO: RenderTexture interpolation

public override int GetHashCode()
{
int hash = base.GetHashCode();

unchecked
{
if (value != null)
hash = 23 * CoreUtils.GetTextureHash(value);
}

return hash;
}
}

/// <summary>
Expand All @@ -1526,6 +1591,19 @@ public class NoInterpRenderTextureParameter : VolumeParameter<RenderTexture>
/// <param name="overrideState">The initial override state for the parameter.</param>
public NoInterpRenderTextureParameter(RenderTexture value, bool overrideState = false)
: base(value, overrideState) { }

public override int GetHashCode()
{
int hash = base.GetHashCode();

unchecked
{
if (value != null)
hash = 23 * CoreUtils.GetTextureHash(value);
}

return hash;
}
}

/// <summary>
Expand All @@ -1542,6 +1620,19 @@ public class CubemapParameter : VolumeParameter<Texture>
public CubemapParameter(Texture value, bool overrideState = false)
: base(value, overrideState) { }
// TODO: Cubemap interpolation

public override int GetHashCode()
{
int hash = base.GetHashCode();

unchecked
{
if (value != null)
hash = 23 * CoreUtils.GetTextureHash(value);
}

return hash;
}
}

/// <summary>
Expand All @@ -1557,6 +1648,19 @@ public class NoInterpCubemapParameter : VolumeParameter<Cubemap>
/// <param name="overrideState">The initial override state for the parameter.</param>
public NoInterpCubemapParameter(Cubemap value, bool overrideState = false)
: base(value, overrideState) { }

public override int GetHashCode()
{
int hash = base.GetHashCode();

unchecked
{
if (value != null)
hash = 23 * CoreUtils.GetTextureHash(value);
}

return hash;
}
}

/// <summary>
Expand Down
1 change: 1 addition & 0 deletions com.unity.render-pipelines.high-definition/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
- Fixed artifacts on gpu light culling when the frustum near and far are very spread out (case 1386436)
- Fixed missing unit in ray tracing related tooltips and docs (case 1397491).
- Fixed errors spamming when in player mode due to ray tracing light cluster debug view (case 1390471).
- Fixed static lighting sky update when using an HDRI sky with a render texture in parameter.

## [14.0.0] - 2021-11-17

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -150,8 +150,8 @@ public override int GetHashCode()
hash = hash * 23 + dirLightShadow.overrideState.GetHashCode();
hash = hash * 23 + rectLightShadow.overrideState.GetHashCode();
#else
hash = hdriSky.value != null ? hash * 23 + hdriSky.GetHashCode() : hash;
hash = flowmap.value != null ? hash * 23 + flowmap.GetHashCode() : hash;
hash = hash * 23 + hdriSky.GetHashCode();
hash = hash * 23 + flowmap.GetHashCode();
hash = hash * 23 + distortionMode.GetHashCode();
hash = hash * 23 + upperHemisphereOnly.GetHashCode();
hash = hash * 23 + scrollOrientation.GetHashCode();
Expand Down