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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -166,12 +166,3 @@ MonoBehaviour:
XrSdk:
StereoModes: 0
Reason: unstable with cache server
- FilteredScene: {fileID: 0}
FilteredScenes:
- {fileID: 102900000, guid: fa0d54c5ccbc8b143a8db100374e0f5e, type: 3}
ColorSpace: 1
BuildPlatform: -2
GraphicsDevice: 16
XrSdk:
StereoModes: 0
Reason: not supported on metal for now
2 changes: 1 addition & 1 deletion com.unity.render-pipelines.high-definition/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,14 +65,14 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
- Fixed auto-exposure mismatch between sky background and scene objects in path tracing (case 1385131).
- Fixed option to force motion blur off when in XR.
- Fixed write to VT feedback in debug modes (case 1376874)
- Fixed the water system not working on metal.

### Changed
- Converted most TGA textures files to TIF to reduce the size of HDRP material samples.
- Changed sample scene in HDRP material samples: add shadow transparency (raster, ray-traced, path-traced).
- Support for encoded HDR cubemaps, configurable via the HDR Cubemap Encoding project setting.
- The rendering order of decals that have a similar draw order value was modified. The new order should be the reverse of the previous order.


## [13.1.2] - 2021-11-05

### Added
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,6 @@ public class Styles
public static readonly GUIContent probeVolumeSHBands = EditorGUIUtility.TrTextContent("SH Bands", "Determines up to what SH bands the Probe Volume will use. Choosing L2 will lead to better quality, but also higher memory and runtime cost.");
public static readonly GUIContent maxLocalVolumetricFogSizeStyle = EditorGUIUtility.TrTextContent("Max Local Fog Size", "Specifies the maximum size for the individual 3D Local Volumetric Fog texture that HDRP uses for Local Volumetric Fog. This settings will affect your memory consumption.");
public static readonly GUIContent maxLocalVolumetricFogOnScreenStyle = EditorGUIUtility.TrTextContent("Max Local Fog On Screen", "Sets the maximum number of Local Volumetric Fog can handle on screen at once. This settings will affect your memory consumption.");
public static readonly GUIContent waterUnsupportedWarning = EditorGUIUtility.TrTextContent("Water surfaces are not supported on metal for now.");

public const string cacheErrorFormat = "This configuration will lead to more than 2 GB reserved for this cache at runtime! ({0} requested) Only {1} element will be reserved instead.";
public const string cacheInfoFormat = "Reserving {0} in memory at runtime.";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -715,9 +715,6 @@ static void Drawer_SectionWaterSettings(SerializedHDRenderPipelineAsset serializ
EditorGUILayout.PropertyField(serialized.renderPipelineSettings.supportWater, Styles.supportWaterContent);
using (new EditorGUI.DisabledScope(!serialized.renderPipelineSettings.supportWater.boolValue))
{
// If we are on metal, the feature is not supported yet.
if (SystemInfo.graphicsDeviceType == GraphicsDeviceType.Metal)
EditorGUILayout.HelpBox(Styles.waterUnsupportedWarning.text, MessageType.Warning, wide: true);
EditorGUILayout.PropertyField(serialized.renderPipelineSettings.waterSimulationResolution, Styles.waterSimulationResolutionContent);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -373,9 +373,6 @@ void UpdateShaderVariablesWater(WaterSurface currentWater, ref ShaderVariablesWa

// Compute the size of the patches and their scale
cb._BandPatchSize = currentWater.simulation.patchSizes;
cb._BandPatchUVScale = new Vector4(1.0f, currentWater.simulation.patchSizes.x / currentWater.simulation.patchSizes.y,
currentWater.simulation.patchSizes.x / currentWater.simulation.patchSizes.z,
currentWater.simulation.patchSizes.x / currentWater.simulation.patchSizes.w);

// Wind direction
cb._WindDirection = OrientationToDirection(currentWater.windOrientation);
Expand Down Expand Up @@ -412,8 +409,6 @@ void UpdateShaderVariablesWater(WaterSurface currentWater, ref ShaderVariablesWa
cb._HeightBasedScattering = currentWater.heightScattering * 2.0f;
cb._DisplacementScattering = currentWater.displacementScattering * 0.5f;

cb._CloudTexturedAmount = 1.0f;

float scatteringLambertLightingNear = 0.6f;
float scatteringLambertLightingFar = 0.06f;
cb._ScatteringLambertLighting = new Vector4(scatteringLambertLightingNear, scatteringLambertLightingFar, Mathf.Lerp(0.5f, 1.0f, scatteringLambertLightingNear), Mathf.Lerp(0.5f, 1.0f, scatteringLambertLightingFar));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,12 @@ unsafe struct ShaderVariablesWater
// Individual sizes of the wave bands
public Vector4 _BandPatchSize;

// Scale of the individual patches
public Vector4 _BandPatchUVScale;

// Wind speed per band
public Vector4 _WindSpeed;

// Horizontal wind direction
public Vector2 _WindDirection;
// Amount of choppiness per band
// Amount of choppiness
public float _Choppiness;
// Delta-time since the last simulation step
public float _DeltaTime;
Expand All @@ -44,27 +41,30 @@ unsafe struct ShaderVariablesWater
// TODO WRITE
public float _SSSMaskCoefficient;

// TODO write
public float _CloudTexturedAmount;
// Padding
public float _RefractionNormalWeight;
public Vector2 _PaddingW0;
// Maximum refraction distance
public float _MaxRefractionDistance;
// Smoothness of the water part of the surface (non foam)
public float _WaterSmoothness;

// Horizonal offsets of the foam texture
public Vector2 _FoamOffsets;
// Tiling parameter of the foam texture
public float _FoamTilling;
// Attenuation of the foam due to the wind
public float _WindFoamAttenuation;

public Vector3 _ScatteringColorTips;
public float _FoamSmoothness;
// Color applied to the surfaces that are through the refraction
public Vector4 _TransparencyColor;

public Vector4 _ScatteringColorTips;

public float _DispersionAmount;
public float _RefractionLow;
public float _MaxAbsorptionDistance;
public float _ScatteringBlur;

public Vector3 _TransparencyColor;
public float _OutScatteringCoefficient;

public float _DisplacementScattering;
public float _ScatteringIntensity;
Expand All @@ -73,8 +73,12 @@ unsafe struct ShaderVariablesWater

public Vector4 _ScatteringLambertLighting;

public Vector3 _DeepFoamColor;
public Vector4 _DeepFoamColor;

public float _OutScatteringCoefficient;
public float _FoamSmoothness;
public float _HeightBasedScattering;
public float _PaddingW1;

public Vector4 _FoamJacobianLambda;
}
Expand All @@ -88,15 +92,19 @@ unsafe struct ShaderVariablesWaterRendering
public Vector2 _WaterRotation;

// Offset of the current patch w/r to the origin
public Vector3 _PatchOffset;
public Vector4 _PatchOffset;
// Ambient probe used to render the water
public Vector4 _WaterAmbientProbe;

// Resolution (in quads) of the current water patch
public uint _GridRenderingResolution;

// Ambient probe used to render the water
public Vector3 _WaterAmbientProbe;
// Mask that defines the tessellation pattern

public uint _TesselationMasks;
// Earth radius
public float _EarthRadius;
// Intensity of the water caustics
public float _CausticsIntensity;

// Scale of the current water mask
public Vector2 _WaterMaskScale;
// Offset of the current water mask
Expand All @@ -113,12 +121,5 @@ unsafe struct ShaderVariablesWaterRendering
public float _CausticsTiling;
// Vertical shift on when the caustics start
public float _CausticsPlaneOffset;

// Padding
public Vector2 _PaddingWR0;
// Earth radius
public float _EarthRadius;
// Intensity of the water caustics
public float _CausticsIntensity;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ CBUFFER_START(ShaderVariablesWater)
float _DirectionDampener;
float4 _WaveAmplitude;
float4 _BandPatchSize;
float4 _BandPatchUVScale;
float4 _WindSpeed;
float2 _WindDirection;
float _Choppiness;
Expand All @@ -22,28 +21,28 @@ CBUFFER_START(ShaderVariablesWater)
float _SurfaceFoamAmount;
float _DeepFoamAmount;
float _SSSMaskCoefficient;
float _CloudTexturedAmount;
float _RefractionNormalWeight;
float2 _PaddingW0;
float _MaxRefractionDistance;
float _WaterSmoothness;
float2 _FoamOffsets;
float _FoamTilling;
float _WindFoamAttenuation;
float3 _ScatteringColorTips;
float _FoamSmoothness;
float4 _TransparencyColor;
float4 _ScatteringColorTips;
float _DispersionAmount;
float _RefractionLow;
float _MaxAbsorptionDistance;
float _ScatteringBlur;
float3 _TransparencyColor;
float _OutScatteringCoefficient;
float _DisplacementScattering;
float _ScatteringIntensity;
float _BodyScatteringWeight;
float _TipScatteringWeight;
float4 _ScatteringLambertLighting;
float3 _DeepFoamColor;
float4 _DeepFoamColor;
float _OutScatteringCoefficient;
float _FoamSmoothness;
float _HeightBasedScattering;
float _PaddingW1;
float4 _FoamJacobianLambda;
CBUFFER_END

Expand All @@ -52,20 +51,19 @@ CBUFFER_END
CBUFFER_START(ShaderVariablesWaterRendering)
float2 _GridSize;
float2 _WaterRotation;
float3 _PatchOffset;
float4 _PatchOffset;
float4 _WaterAmbientProbe;
uint _GridRenderingResolution;
float3 _WaterAmbientProbe;
uint _TesselationMasks;
float _EarthRadius;
float _CausticsIntensity;
float2 _WaterMaskScale;
float2 _WaterMaskOffset;
float2 _FoamMaskScale;
float2 _FoamMaskOffset;
float2 _CausticsOffset;
float _CausticsTiling;
float _CausticsPlaneOffset;
float2 _PaddingWR0;
float _EarthRadius;
float _CausticsIntensity;
CBUFFER_END


Expand Down