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
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 @@ -28,6 +28,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
- Fixed missing information in the tooltip of affects smooth surfaces of the ray traced reflections denoiser (case 1376918).
- Fixed objects belonging to preview scenes being marked as dirty during migration (case 1367204).
- Fixed compilation errors from Path Tracing on the PS5 build.
- Fixed option to force motion blur off when in XR.

## [12.1.2] - 2021-10-22

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,7 @@ public class Styles
public static readonly GUIContent XRSinglePass = EditorGUIUtility.TrTextContent("Single Pass", "When enabled, XR views are rendered simultaneously and the render loop is processed only once. This setting will improve CPU and GPU performance but will use more GPU memory.");
public static readonly GUIContent XROcclusionMesh = EditorGUIUtility.TrTextContent("Occlusion Mesh", "When enabled, the occlusion mesh will be rendered for each view during the depth prepass to reduce shaded fragments.");
public static readonly GUIContent XRCameraJitter = EditorGUIUtility.TrTextContent("Camera Jitter", "When enabled, jitter will be added to the camera to provide more samples for temporal effects. This is usually not required in VR due to micro variations from the tracking.");
public static readonly GUIContent XRMotionBlur = EditorGUIUtility.TrTextContent("Allow Motion Blur", "When enabled, motion blur can be used in XR. When this option is disabled, regardless of the settings, motion blur will be turned off when in XR.");

public static readonly GUIContent lutSize = EditorGUIUtility.TrTextContent("Grading LUT Size", "Sets size of the internal and external color grading lookup textures (LUTs).");
public static readonly GUIContent lutFormat = EditorGUIUtility.TrTextContent("Grading LUT Format", "Specifies the encoding format for color grading lookup textures. Lower precision formats are faster and use less memory at the expense of color precision.");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -701,6 +701,7 @@ static void Drawer_SectionXRSettings(SerializedHDRenderPipelineAsset serialized,
EditorGUILayout.PropertyField(serialized.renderPipelineSettings.xrSettings.singlePass, Styles.XRSinglePass);
EditorGUILayout.PropertyField(serialized.renderPipelineSettings.xrSettings.occlusionMesh, Styles.XROcclusionMesh);
EditorGUILayout.PropertyField(serialized.renderPipelineSettings.xrSettings.cameraJitter, Styles.XRCameraJitter);
EditorGUILayout.PropertyField(serialized.renderPipelineSettings.xrSettings.allowMotionBlur, Styles.XRMotionBlur);
}

static void Drawer_SectionVTSettings(SerializedHDRenderPipelineAsset serialized, Editor owner)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ class SerializedXRSettings
public SerializedProperty singlePass;
public SerializedProperty occlusionMesh;
public SerializedProperty cameraJitter;
public SerializedProperty allowMotionBlur;

public SerializedXRSettings(SerializedProperty root)
{
Expand All @@ -17,6 +18,7 @@ public SerializedXRSettings(SerializedProperty root)
singlePass = root.Find((GlobalXRSettings s) => s.singlePass);
occlusionMesh = root.Find((GlobalXRSettings s) => s.occlusionMesh);
cameraJitter = root.Find((GlobalXRSettings s) => s.cameraJitter);
allowMotionBlur = root.Find((GlobalXRSettings s) => s.allowMotionBlur);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3639,6 +3639,13 @@ TextureHandle MotionBlurPass(RenderGraph renderGraph, HDCamera hdCamera, Texture
{
if (m_MotionBlur.IsActive() && m_AnimatedMaterialsEnabled && !hdCamera.resetPostProcessingHistory && m_MotionBlurFS)
{
// If we are in XR we need to check if motion blur is allowed at all.
if (hdCamera.xr.enabled)
{
if (!m_Asset.currentPlatformRenderPipelineSettings.xrSettings.allowMotionBlur)
return source;
}

using (var builder = renderGraph.AddRenderPass<MotionBlurData>("Motion Blur", out var passData, ProfilingSampler.Get(HDProfileId.MotionBlur)))
{
PrepareMotionBlurPassData(renderGraph, builder, passData, hdCamera, source, motionVectors, depthTexture);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ public struct GlobalXRSettings
{
singlePass = true,
occlusionMesh = true,
cameraJitter = false
cameraJitter = false,
allowMotionBlur = true
};

/// <summary>Use single pass.</summary>
Expand All @@ -21,5 +22,7 @@ public struct GlobalXRSettings
public bool occlusionMesh;
/// <summary>Add jitter to camera for temporal effects.</summary>
public bool cameraJitter;
/// <summary>Allow motion blur when in XR.</summary>
public bool allowMotionBlur;
}
}