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
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 @@ -80,6 +80,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
- Fixed one frame flicker on hardware DRS - (case 1398085)
- Fixed using the wrong coordinate to compute the sampling direction for the screen space global illumination.
- Fixed an issue where forced sky update (like PBR sky amortized updated) would not update ambient probe.
- 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