Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
dedddbe
Modify scene for better stability (#1120)
remi-chapelain Jul 6, 2020
db99426
Fix area light gizmo not updating engine side light v2 (#1156)
FrancescoC-unity Jul 6, 2020
9af51f9
Updated doc. (#1152)
eturquin Jul 6, 2020
55f0529
Merge branch 'master' into HDRP/staging
sebastienlagarde Jul 6, 2020
f8893e5
Address decal layer documentation feedback (#1157)
sebastienlagarde Jul 7, 2020
7514ba1
Hdrp/docs/upgrading to 2020.2 (#1170)
JordanL8 Jul 7, 2020
fd7ff2e
HDRP - Shutter speed can now be changed by dragging the mouse over th…
pmavridis Jul 7, 2020
d150394
Merge branch 'master' into HDRP/staging
sebastienlagarde Jul 7, 2020
a9a73a4
Fix API breaking change: Add Public quality to Raytracing volume effe…
sebastienlagarde Jul 7, 2020
b0d3cce
ix API breaking change: Add Public quality to Raytracing volume effec…
sebastienlagarde Jul 7, 2020
19cee37
Add 3 tests in HDRP_Test for 1709_DecalLayers for deferred, forward a…
sebastienlagarde Jul 7, 2020
4e5caa5
Added what's new page and relevant images (#1154)
JordanL8 Jul 7, 2020
9cc6c52
update what's new
sebastienlagarde Jul 7, 2020
6c250d7
Fix Material Creation RenderQueue setup + Fix AXF GUI (#1185)
sebastienlagarde Jul 7, 2020
fa607fd
Refactor keyword system in ShaderGraph (#1181)
alelievr Jul 7, 2020
9df292f
Made conversion from render graph handles to actual resource implicit…
JulienIgnace-Unity Jul 8, 2020
17b195b
Fix double sided unlit mode in the UI (#1203)
alelievr Jul 8, 2020
0ed3553
HDRP: Default indirect Lighting controller Layers to Everything to ea…
sebastienlagarde Jul 8, 2020
1f5f2a9
Update cas include paths (#1227)
FrancescoC-unity Jul 9, 2020
c745c93
Hdrp/fix rt odd negative scale (#1180)
eturquin Jul 9, 2020
bc3ee23
Hdrp/fix hierarchicalbox gizmo symetry and homothety mode ensuring fa…
RSlysz Jul 9, 2020
5feb1bf
fix XR single-pass macros in tessellation shaders (#1160)
fabien-unity Jul 9, 2020
9b496b4
Merge branch 'master' into HDRP/staging
sebastienlagarde Jul 9, 2020
f0bc668
Remove automatic setup of global texture from Render Graph (#1192)
JulienIgnace-Unity Jul 10, 2020
e0b6ffc
Hdrp/atlas cube modif (#1235)
skhiat Jul 10, 2020
19abaa0
Hdrp/pt sss diff mix (#1224)
eturquin Jul 10, 2020
de0bc24
Merge branch 'master' into HDRP/staging
sebastienlagarde Jul 10, 2020
0bba55a
Change Cloud Layer API (#1237)
adrien-de-tocqueville Jul 10, 2020
f1b363e
ShaderGraph UI fixes (#1216)
alelievr Jul 10, 2020
9a8d3b1
Move shadergraph properties (#1214)
alelievr Jul 10, 2020
614541f
Fix custom pass reorder (#1153)
alelievr Jul 10, 2020
958486d
Revert "Move shadergraph properties (#1214)"
sebastienlagarde Jul 10, 2020
281a5e3
Update Upgrading-from-2020.1-to-2020.2.md
sebastienlagarde Jul 10, 2020
0fa339e
Make sure we don't end up with null normals from normal mapping, when…
eturquin Jul 10, 2020
0ba9c99
Contact shadows improvements (#1226)
FrancescoC-unity Jul 10, 2020
664fe24
Revert "Revert "Move shadergraph properties (#1214)""
sebastienlagarde Jul 10, 2020
8b21995
Fix migration issue in PR (Move shadergraph properties #1214)
sebastienlagarde Jul 10, 2020
1712083
TAA and Physically based DoF (#1193)
pmavridis Jul 10, 2020
17559df
Merge branch 'master' into HDRP/staging
sebastienlagarde Jul 10, 2020
0899c29
Merge branch 'master' into HDRP/staging
sebastienlagarde Jul 10, 2020
297f9d6
Fix an issue with DofGather.compute not compiling on Metal
sebastienlagarde Jul 10, 2020
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.
24 changes: 6 additions & 18 deletions com.unity.render-pipelines.core/Runtime/RenderGraph/RenderGraph.cs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ class RenderGraphDebugParams
public bool tagResourceNamesWithRG;
public bool clearRenderTargetsAtCreation;
public bool clearRenderTargetsAtRelease;
public bool unbindGlobalTextures;
public bool logFrameInformation;
public bool logResources;

Expand All @@ -64,7 +63,6 @@ public void RegisterDebug()
list.Add(new DebugUI.BoolField { displayName = "Tag Resources with RG", getter = () => tagResourceNamesWithRG, setter = value => tagResourceNamesWithRG = value });
list.Add(new DebugUI.BoolField { displayName = "Clear Render Targets at creation", getter = () => clearRenderTargetsAtCreation, setter = value => clearRenderTargetsAtCreation = value });
list.Add(new DebugUI.BoolField { displayName = "Clear Render Targets at release", getter = () => clearRenderTargetsAtRelease, setter = value => clearRenderTargetsAtRelease = value });
list.Add(new DebugUI.BoolField { displayName = "Unbind Global Textures", getter = () => unbindGlobalTextures, setter = value => unbindGlobalTextures = value });
list.Add(new DebugUI.Button { displayName = "Log Frame Information", action = () => logFrameInformation = true });
list.Add(new DebugUI.Button { displayName = "Log Resources", action = () => logResources = true });

Expand Down Expand Up @@ -267,11 +265,10 @@ public void PurgeUnusedResources()
/// Any pass writing to an imported texture will be considered having side effects and can't be automatically pruned.
/// </summary>
/// <param name="rt">External RTHandle that needs to be imported.</param>
/// <param name="shaderProperty">Optional property that allows you to specify a Shader property name to use for automatic resource binding.</param>
/// <returns>A new TextureHandle.</returns>
public TextureHandle ImportTexture(RTHandle rt, int shaderProperty = 0)
public TextureHandle ImportTexture(RTHandle rt)
{
return m_Resources.ImportTexture(rt, shaderProperty);
return m_Resources.ImportTexture(rt);
}

/// <summary>
Expand All @@ -288,22 +285,20 @@ public TextureHandle ImportBackbuffer(RenderTargetIdentifier rt)
/// Create a new Render Graph Texture resource.
/// </summary>
/// <param name="desc">Texture descriptor.</param>
/// <param name="shaderProperty">Optional property that allows you to specify a Shader property name to use for automatic resource binding.</param>
/// <returns>A new TextureHandle.</returns>
public TextureHandle CreateTexture(in TextureDesc desc, int shaderProperty = 0)
public TextureHandle CreateTexture(in TextureDesc desc)
{
return m_Resources.CreateTexture(desc, shaderProperty);
return m_Resources.CreateTexture(desc);
}

/// <summary>
/// Create a new Render Graph Texture resource using the descriptor from another texture.
/// </summary>
/// <param name="texture">Texture from which the descriptor should be used.</param>
/// <param name="shaderProperty">Optional property that allows you to specify a Shader property name to use for automatic resource binding.</param>
/// <returns>A new TextureHandle.</returns>
public TextureHandle CreateTexture(TextureHandle texture, int shaderProperty = 0)
public TextureHandle CreateTexture(TextureHandle texture)
{
return m_Resources.CreateTexture(m_Resources.GetTextureResourceDesc(texture.handle), shaderProperty);
return m_Resources.CreateTexture(m_Resources.GetTextureResourceDesc(texture.handle));
}

/// <summary>
Expand Down Expand Up @@ -899,10 +894,6 @@ void PreRenderPassExecute(in CompiledPassInfo passInfo, RenderGraphContext rgCon
// TODO RENDERGRAPH merge clear and setup here if possible
RenderGraphPass pass = passInfo.pass;

// TODO RENDERGRAPH remove this when we do away with auto global texture setup
// (can't put it in the profiling scope otherwise it might be executed on compute queue which is not possible for global sets)
m_Resources.PreRenderPassSetGlobalTextures(rgContext, pass.resourceReadLists[(int)RenderGraphResourceType.Texture]);

foreach (var texture in passInfo.resourceCreateList[(int)RenderGraphResourceType.Texture])
m_Resources.CreateAndClearTexture(rgContext, texture);

Expand Down Expand Up @@ -944,9 +935,6 @@ void PostRenderPassExecute(CommandBuffer mainCmd, ref CompiledPassInfo passInfo,
rgContext.cmd = mainCmd; // Restore the main command buffer.
}

if (m_DebugParameters.unbindGlobalTextures)
m_Resources.PostRenderPassUnbindGlobalTextures(rgContext, pass.resourceReadLists[(int)RenderGraphResourceType.Texture]);

m_RenderGraphPool.ReleaseAllTempAlloc();

foreach (var texture in passInfo.resourceReleaseList[(int)RenderGraphResourceType.Texture])
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ public TextureHandle WriteTexture(in TextureHandle input)
/// <returns>A new transient TextureHandle.</returns>
public TextureHandle CreateTransientTexture(in TextureDesc desc)
{
var result = m_Resources.CreateTexture(desc, 0, m_RenderPass.index);
var result = m_Resources.CreateTexture(desc, m_RenderPass.index);
m_RenderPass.AddTransientResource(result.handle);
return result;
}
Expand All @@ -87,7 +87,7 @@ public TextureHandle CreateTransientTexture(in TextureDesc desc)
public TextureHandle CreateTransientTexture(in TextureHandle texture)
{
var desc = m_Resources.GetTextureResourceDesc(texture.handle);
var result = m_Resources.CreateTexture(desc, 0, m_RenderPass.index);
var result = m_Resources.CreateTexture(desc, m_RenderPass.index);
m_RenderPass.AddTransientResource(result.handle);
return result;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,13 @@ class IRenderGraphResource
{
public bool imported;
public int cachedHash;
public int shaderProperty;
public int transientPassIndex;
public bool wasReleased;

public virtual void Reset()
{
imported = false;
cachedHash = -1;
shaderProperty = 0;
transientPassIndex = -1;
wasReleased = false;
}
Expand Down Expand Up @@ -209,12 +207,11 @@ internal int GetResourceTransientIndex(in ResourceHandle res)
}

// Texture Creation/Import APIs are internal because creation should only go through RenderGraph
internal TextureHandle ImportTexture(RTHandle rt, int shaderProperty = 0)
internal TextureHandle ImportTexture(RTHandle rt)
{
int newHandle = AddNewResource(m_Resources[(int)RenderGraphResourceType.Texture], out TextureResource texResource);
texResource.resource = rt;
texResource.imported = true;
texResource.shaderProperty = shaderProperty;

return new TextureHandle(newHandle);
}
Expand Down Expand Up @@ -246,13 +243,12 @@ internal TextureHandle ImportBackbuffer(RenderTargetIdentifier rt)
return result;
}

internal TextureHandle CreateTexture(in TextureDesc desc, int shaderProperty = 0, int transientPassIndex = -1)
internal TextureHandle CreateTexture(in TextureDesc desc, int transientPassIndex = -1)
{
ValidateTextureDesc(desc);

int newHandle = AddNewResource(m_Resources[(int)RenderGraphResourceType.Texture], out TextureResource texResource);
texResource.desc = desc;
texResource.shaderProperty = shaderProperty;
texResource.transientPassIndex = transientPassIndex;
return new TextureHandle(newHandle);
}
Expand Down Expand Up @@ -408,32 +404,6 @@ internal void CreateComputeBuffer(RenderGraphContext rgContext, int index)
}
}

void SetGlobalTextures(RenderGraphContext rgContext, List<ResourceHandle> textures, bool bindDummyTexture)
{
foreach (var resource in textures)
{
var resourceDesc = GetTextureResource(resource);
if (resourceDesc.shaderProperty != 0)
{
if (resourceDesc.resource != null)
{
rgContext.cmd.SetGlobalTexture(resourceDesc.shaderProperty, bindDummyTexture ? TextureXR.GetMagentaTexture() : resourceDesc.resource);
}
}
}
}


internal void PreRenderPassSetGlobalTextures(RenderGraphContext rgContext, List<ResourceHandle> textures)
{
SetGlobalTextures(rgContext, textures, false);
}

internal void PostRenderPassUnbindGlobalTextures(RenderGraphContext rgContext, List<ResourceHandle> textures)
{
SetGlobalTextures(rgContext, textures, true);
}

internal void ReleaseTexture(RenderGraphContext rgContext, int index)
{
var resource = m_Resources[(int)RenderGraphResourceType.Texture][index] as TextureResource;
Expand Down
2 changes: 1 addition & 1 deletion com.unity.render-pipelines.core/ShaderLibrary/Packing.hlsl
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ real3 UnpackNormalAG(real4 packedNormal, real scale = 1.0)
{
real3 normal;
normal.xy = packedNormal.ag * 2.0 - 1.0;
normal.z = sqrt(1.0 - saturate(dot(normal.xy, normal.xy)));
normal.z = max(1.0e-16, sqrt(1.0 - saturate(dot(normal.xy, normal.xy))));

// must scale after reconstruction of normal.z which also
// mirrors UnpackNormalRGB(). This does imply normal is not returned
Expand Down
6 changes: 6 additions & 0 deletions com.unity.render-pipelines.high-definition/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
- Added an option to extend the camera culling for skinned mesh animation in ray tracing effects (1258547).
- Added decal layer system similar to light layer. Mesh will receive a decal when both decal layer mask matches.
- Added shader graph nodes for rendering a complex eye shader.
- Added more controls to contact shadows and increased quality in some parts.
- Added a physically based option in DoF volume.

### Fixed
- Fix when rescale probe all direction below zero (1219246)
Expand Down Expand Up @@ -726,6 +728,9 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
- Fixed robustness issue with GetOddNegativeScale() in ray tracing, which was impacting normal mapping (1261160).
- Fixed regression where moving face of the probe gizmo was not moving its position anymore.
- Fixed XR single-pass macros in tessellation shaders.
- Fixed path-traced subsurface scattering mixing with diffuse and specular BRDFs (1250601).
- Fixed custom pass re-ordering issues.
- Improved robustness of normal mapping when scale is 0, and mapping is extreme (normals in or below the tangent plane).

### Changed
- Improve MIP selection for decals on Transparents
Expand Down Expand Up @@ -886,6 +891,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
- PBR Sky now doesn't go black when going below sea level, but it instead freezes calculation as if on the horizon.
- Fixed an issue with quality setting foldouts not opening when clicking on them (1253088).
- Shutter speed can now be changed by dragging the mouse over the UI label (case 1245007).
- Remove the 'Point Cube Size' for cookie, use the Cubemap size directly.

## [7.1.1] - 2019-09-05

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ This example Cloud Map is a read-only **CustomRenderTexture**. This means that,

## Customizing the Cloud Map

The Cloud Map is a 2D texture in LatLong layout (sometimes called Cylindrical or Equirectangular) that contains cloud color in the RGB channel and cloud coverage in the alpha channel.
If **Upper Hemisphere Only** is checked, the map is interpreted as being the upper half of a LatLong texture.
The Cloud Map is a 2D texture in LatLong layout (sometimes called Cylindrical or Equirectangular) that contains cloud opacity in the red channel.
If **Upper Hemisphere Only** is checked, the map is interpreted as being the upper half of a LatLong texture. It means that it will only conver the sky above the horizon.

<a name="CustomizingFlowmap"></a>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ Only one Light can cast Contact Shadows at a time. This means that, if you have
| __Fade Out Distance__ | The distance, in meters, over which HDRP fades Contact Shadows out when at the __Max Distance__. |
| __Sample Count__ | Use the slider to set the number of samples HDRP uses for ray casting. Increasing this increases quality at the cost of performance. |
| __Opacity__ | Use the slider to set the opacity of the Contact Shadows. Lower values result in softer, less prominent shadows. |
| **Ray Bias** | Controls the bias applied to the screen space ray cast to get contact shadows. Higher values can reduce self shadowing, however too high values might lead to peter-panning that can be especially undesirable with contact shadows. |
| **Thickness** | Controls the thickness of the objects found along the ray, essentially thickening the contact shadows. It can be used to fill holes in the shadows, however might also lead to overly wide shadows. |

## Details

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ Depth Of Field includes [more options](More-Options.html) that you must manually
| -------------------------- | ------------------------------------------------------------ |
| **Resolution** | Use the drop-down to set the resolution at which HDRP processes the depth of field effect. If you target consoles that use a very high resolution (for example, 4k), select **Quarter,** because it is less resource intensive.<br />&#8226; **Quarter**: Uses quarter the screen resolution.<br />&#8226; **Half**: Uses half the screen resolution.<br />This property only appears when you enable [more options](More-Options.html). |
| **High Quality Filtering** | Enable the checkbox to make HDRP use bicubic filtering instead of bilinear filtering. This increases the resource intensity of the Depth Of Field effect, but results in smoother visuals.<br />This property only appears when you enable [more options](More-Options.html). |
| **Physically Based** | Enable the checkbox to make HDRP use a more accurate but slower physically-based technique for the computation of Deph-of-Field. It is highly recommended to enable [Temporal anti-aliasing (TAA)](Anti-Aliasing) at the same time, for improved quality and performance.|

<a name="PhysicalCameraSettings"></a>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ In the 2D Atlas Size drop-down, select a larger cookie resolution.

From Unity 2020.2, the texture format of the color buffer in the HDRP Asset also applies to [Planar Reflection Probes](Planar-Reflection-Probe.md). Previously, Planar Reflection Probes always used a float16 rendertarget.

From Unity 2020.2, the light layer properties have move from the HDRP settings to the HDRP Default setting Panel.

## Shadows

From Unity 2020.2, it is no longer necessary to change the [HDRP Config package](HDRP-Config-Package.md) to set the [shadow filtering quality](HDRP-Asset.md#FilteringQualities) for deferred rendering. Instead, you can now change the filtering quality directly on the [HDRP Asset](HDRP-Asset.md#FilteringQualities). Note if you previously had not set the shadow filtering quality to **Medium** on the HDRP Asset, the automatic project upgrade process changes the shadow quality which means you may need to manually change it back to its original value.
Expand All @@ -48,6 +50,8 @@ HDRP now stores OnEnable and OnDemand shadows in a separate atlas and more API i

The shader function `SampleShadow_PCSS` now requires you to pass in an additional float2 parameter which contains the shadow atlas resolution in x and the inverse of the atlas resolution in y.

Ray bias and thickness parameters have been added to contact shadows. These might lead to small changes to the visual impact of contact shadows with the default parameters. Please consider tuning those values to fit the needs of your project.

## Shader config file

From Unity 2020.2, due to the change of the shadow map, HDRP moved the HDShadowFilteringQuality enum to HDShadowManager.cs. HDRP also removed ShaderConfig.s_DeferredShadowFiltering and ShaderOptions.DeferredShadowFiltering from the source code because they have no effect anymore.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,10 @@ You can now control the texture mapping mode for all textures in the [AxF Shader

For more information about this improvement, see [AxF Shader](AxF-Shader.md).

### Contact Shadows Improvements

More control is given for contact shadows, in particular now a bias can be set to avoid self intersection issues and a new thickness parameter is introduced to fill gaps that can be left by contact shadows.

### Exposure

#### Exposure curve mapping
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ class ContactShadowsEditor : VolumeComponentWithQualityEditor
SerializedDataParameter m_FadeInDistance;
SerializedDataParameter m_SampleCount;
SerializedDataParameter m_Opacity;
SerializedDataParameter m_Bias;
SerializedDataParameter m_Thickness;

public override void OnEnable()
{
Expand All @@ -32,6 +34,8 @@ public override void OnEnable()
m_FadeInDistance = Unpack(o.Find(x => x.fadeInDistance));
m_SampleCount = Unpack(o.Find(x => x.sampleCount));
m_Opacity = Unpack(o.Find(x => x.opacity));
m_Bias = Unpack(o.Find(x => x.rayBias));
m_Thickness = Unpack(o.Find(x => x.thicknessScale));
}

public override void OnInspectorGUI()
Expand All @@ -49,6 +53,9 @@ public override void OnInspectorGUI()
PropertyField(m_FadeInDistance, EditorGUIUtility.TrTextContent("Fade In Distance", "Sets the distance over which HDRP fades Contact Shadows in when past the Min Distance. Uses meters."));
PropertyField(m_FadeDistance, EditorGUIUtility.TrTextContent("Fade Out Distance", "Sets the distance over which HDRP fades Contact Shadows out when at the Max Distance. Uses meters."));
PropertyField(m_Opacity, EditorGUIUtility.TrTextContent("Opacity", "Controls the opacity of the Contact Shadow."));
PropertyField(m_Bias, EditorGUIUtility.TrTextContent("Bias", "Controls the bias applied to the screen space ray cast to get contact shadows."));
PropertyField(m_Thickness, EditorGUIUtility.TrTextContent("Thickness", "Controls the thickness of the objects found along the ray, essentially thickening the contact shadows."));

base.OnInspectorGUI();
GUI.enabled = useCustomValue;
PropertyField(m_SampleCount, EditorGUIUtility.TrTextContent("Sample Count", "Controls the number of samples HDRP uses for ray casting."));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@ public bool TryUpgradeFromMasterNode(IMasterNode1 masterNode, out Dictionary<Blo
blockMap = null;
if(!(masterNode is DecalMasterNode1 decalMasterNode))
return false;


m_MigrateFromOldSG = true;

// Set data
systemData.surfaceType = (SurfaceType)decalMasterNode.m_SurfaceType;
systemData.dotsInstancing = decalMasterNode.m_DOTSInstancing;
Expand Down Expand Up @@ -67,4 +69,4 @@ public bool TryUpgradeFromMasterNode(IMasterNode1 masterNode, out Dictionary<Blo
return true;
}
}
}
}
Loading