Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
3d79220
Exposed DisableDecals, DisableSSR, DisableSSRTransparent, PreserveSpe…
Jun 17, 2020
8428cbf
Added transparent write MV
Jun 17, 2020
e6eae1a
Merge branch 'HDRP/staging' into HDRP/feature/expose-more-surface-opt…
sebastienlagarde Jun 17, 2020
4d53ddb
always generate transparent Depth Prepass
sebastienlagarde Jun 17, 2020
11d81af
Added material migration step
Jun 18, 2020
6786384
Trying to fix transparent SSR bug
Jun 18, 2020
80a13bb
Merge branch 'HDRP/staging' into HDRP/feature/expose-more-surface-opt…
sebastienlagarde Jun 21, 2020
5e9f290
Bump HDRP project settings version to 5 so yamato can run
sebastienlagarde Jun 21, 2020
3dea618
Cleanup of alpha test + alpha mask + fix shader warning
sebastienlagarde Jun 21, 2020
dcab6f0
Merge branch 'HDRP/staging' into HDRP/feature/expose-more-surface-opt…
sebastienlagarde Jun 21, 2020
c680ccd
Fix AlphaTestShadow: issue
sebastienlagarde Jun 21, 2020
f461c9e
Merge branch 'HDRP/staging' into HDRP/feature/expose-more-surface-opt…
sebastienlagarde Jun 27, 2020
1ec48d8
Fix various code (PS4 - >playstation) + Hidde colorPyramid
sebastienlagarde Jun 27, 2020
d3fc1c8
switch HDRP DXR MaterialVersion to 5
sebastienlagarde Jun 27, 2020
43a62ad
Introduce concept of SHADERPASS_TRANSPARENT_DEPTH_PREPASS / SHADERPAS…
sebastienlagarde Jun 27, 2020
26c0d9f
Fix problem with Double sided, transparent and depth offset.
sebastienlagarde Jun 28, 2020
d5fa1a3
Move Depth offset from Field to HDField
sebastienlagarde Jun 28, 2020
fef87dc
Update Fields.cs
sebastienlagarde Jun 28, 2020
1c35ee2
Fix define for BackThenFront
sebastienlagarde Jun 28, 2020
c99a591
fix MINIMAL_GBUFFER for DXR pass
sebastienlagarde Jun 28, 2020
dcb7330
Fix typo + fix VT for unlit
sebastienlagarde Jun 28, 2020
62f608b
Fix motion vector for transparent on forward material
sebastienlagarde Jun 28, 2020
f0dd78b
Fix compile issue
sebastienlagarde Jun 28, 2020
c1ba69a
Lot of fix on unlit shader
sebastienlagarde Jun 28, 2020
317b45c
fix compile issue
sebastienlagarde Jun 28, 2020
526c8cb
Fix Material for test stacklit DXR SG
sebastienlagarde Jun 28, 2020
614c0d7
Fix the Material surfaceOption
sebastienlagarde Jun 28, 2020
ba54b79
Merge branch 'HDRP/staging' into HDRP/feature/expose-more-surface-opt…
sebastienlagarde Jun 28, 2020
3397fac
Update HDSubShaderUtilities.cs
sebastienlagarde Jun 28, 2020
f8a59ee
Fix Motion Vector for animatoin UX
sebastienlagarde Jun 28, 2020
06507f6
Update Material for VFX project
sebastienlagarde Jun 28, 2020
83b5350
Revert "Update Material for VFX project"
sebastienlagarde Jun 28, 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
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: da692e001514ec24dbc4cca1949ff7e8, type: 3}
m_Name:
m_EditorClassIdentifier:
version: 4
version: 5
--- !u!21 &2100000
Material:
serializedVersion: 6
Expand All @@ -33,10 +33,9 @@ Material:
MotionVector: User
RenderType: Transparent
disabledShaderPasses:
- MOTIONVECTORS
- TransparentDepthPostpass
- TransparentBackface
- TransparentDepthPrepass
- TransparentDepthPostpass
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
Expand All @@ -52,26 +51,38 @@ Material:
m_Texture: {fileID: 2800000, guid: fcecce6d2c9be8d418a27f0658a2210d, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _Texture2DAsset_6ea313656c2744b59b6ca90317e3dc1c_Out_0:
m_Texture: {fileID: 2800000, guid: a720075b2a0ff8440bc021a465769340, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _Texture2DAsset_da5ed3679908438d89ee705e2cccd98c_Out_0:
m_Texture: {fileID: 2800000, guid: a720075b2a0ff8440bc021a465769340, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _Texture2DAsset_fb70cff2f9454b0193c4b5eaff34a18b_Out_0:
m_Texture: {fileID: 2800000, guid: fcecce6d2c9be8d418a27f0658a2210d, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Floats:
- Vector1_555A0A0: 0.5
- _AddPrecomputedVelocity: 0
- _AlphaCutoffEnable: 0
- _AlphaDstBlend: 10
- _AlphaSrcBlend: 1
- _AlphaToMask: 0
- _BlendMode: 0
- _CullMode: 2
- _CullModeForward: 2
- _DepthOffsetEnable: 0
- _DoubleSidedEnable: 0
- _DoubleSidedNormalMode: 2
- _DstBlend: 10
- _EnableBlendModePreserveSpecularLighting: 0
- _EnableFogOnTransparent: 1
- _OpaqueCullMode: 2
- _ReceivesSSR: 1
- _ReceivesSSRTransparent: 0
- _RenderQueueType: 1
- _RenderQueueType: 4
- _RequireSplitLighting: 0
- _SrcBlend: 1
- _StencilRef: 0
Expand All @@ -84,12 +95,14 @@ Material:
- _StencilWriteMaskDistortionVec: 4
- _StencilWriteMaskGBuffer: 14
- _StencilWriteMaskMV: 40
- _SupportDecals: 1
- _SurfaceType: 1
- _TransparentBackfaceEnable: 0
- _TransparentCullMode: 2
- _TransparentDepthPostpassEnable: 0
- _TransparentDepthPrepassEnable: 0
- _TransparentSortPriority: 0
- _TransparentWritingMotionVec: 0
- _TransparentZWrite: 0
- _UseShadowThreshold: 0
- _ZTestDepthEqualForOpaque: 4
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ MonoBehaviour:
m_WizardActiveTab: 0
m_WizardNeedRestartAfterChangingToDX12: 0
m_WizardNeedToRunFixAllAgainAfterDomainReload: 0
m_LastMaterialVersion: 4
m_LastMaterialVersion: 5
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ MonoBehaviour:
m_WizardActiveTab: 0
m_WizardNeedRestartAfterChangingToDX12: 0
m_WizardNeedToRunFixAllAgainAfterDomainReload: 0
m_LastMaterialVersion: 4
m_LastMaterialVersion: 5
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ MonoBehaviour:
m_WizardActiveTab: 0
m_WizardNeedRestartAfterChangingToDX12: 0
m_WizardNeedToRunFixAllAgainAfterDomainReload: 0
m_LastMaterialVersion: 4
m_LastMaterialVersion: 5
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ MonoBehaviour:
m_WizardActiveTab: 0
m_WizardNeedRestartAfterChangingToDX12: 0
m_WizardNeedToRunFixAllAgainAfterDomainReload: 0
m_LastMaterialVersion: 4
m_LastMaterialVersion: 5
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ MonoBehaviour:
m_WizardActiveTab: 0
m_WizardNeedRestartAfterChangingToDX12: 0
m_WizardNeedToRunFixAllAgainAfterDomainReload: 0
m_LastMaterialVersion: 4
m_LastMaterialVersion: 5
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ MonoBehaviour:
m_ProjectSettingFolderPath: HDRPDefaultResources
m_WizardPopupAtStart: 0
m_WizardActiveTab: 0
m_LastMaterialVersion: 4
m_LastMaterialVersion: 5
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ MonoBehaviour:
m_WizardActiveTab: 0
m_WizardNeedRestartAfterChangingToDX12: 0
m_WizardNeedToRunFixAllAgainAfterDomainReload: 0
m_LastMaterialVersion: 4
m_LastMaterialVersion: 5
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,8 @@ From Unity 2020.2, HDRP includes a new rectangular area shadow evaluation functi

From Unity 2020.2, the macro ENABLE_RAYTRACING, SHADEROPTIONS_RAYTRACING, and RAYTRACING_ENABLED have been removed. A new multicompile is introduce for forward pass: SCREEN_SPACE_SHADOWS_OFF SCREEN_SPACE_SHADOWS_ON. This allow to enable raytracing effect without requiring edition of shader config file.

From Unity 2020.2,SHADERPASS for TransparentDepthPrepass and TransparentDepthPostpass identification is using respectively SHADERPASS_TRANSPARENT_DEPTH_PREPASS and SHADERPASS_TRANSPARENT_DEPTH_POSTPASS. Previously it was SHADERPASS_DEPTH_ONLY. Define CUTOFF_TRANSPARENT_DEPTH_PREPASS and CUTOFF_TRANSPARENT_DEPTH_POSTPASS and been removed as the new path macro can now be used.

## Custom pass API

The signature of the Execute function has changed to simplify the parameters, now it only takes a CustomPassContext as its input:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,7 @@ static void OnPostprocessAllAssets(string[] importedAssets, string[] deletedAsse
ZWriteForTransparent,
RenderQueueUpgrade,
ShaderGraphStack,
MoreMaterialSurfaceOptionFromShaderGraph,
};

#region Migrations
Expand Down Expand Up @@ -393,6 +394,32 @@ static void ShaderGraphStack(Material material, HDShaderUtils.ShaderID id)
HDShaderUtils.ResetMaterialKeywords(material);
}

static void MoreMaterialSurfaceOptionFromShaderGraph(Material material, HDShaderUtils.ShaderID id)
{
if (material.shader.IsShaderGraph())
{
// Synchronize properties we exposed from SG to the material
ResetFloatProperty(kReceivesSSR);
Comment thread
sebastienlagarde marked this conversation as resolved.
ResetFloatProperty(kReceivesSSRTransparent);
ResetFloatProperty(kEnableDecals);
ResetFloatProperty(kEnableBlendModePreserveSpecularLighting);
ResetFloatProperty(kTransparentWritingMotionVec);
ResetFloatProperty(kAddPrecomputedVelocity);
ResetFloatProperty(kDepthOffsetEnable);
}

void ResetFloatProperty(string propName)
{
int propIndex = material.shader.FindPropertyIndex(propName);
if (propIndex == -1)
return;
float defaultValue = material.shader.GetPropertyDefaultFloatValue(propIndex);
material.SetFloat(propName, defaultValue);
}

HDShaderUtils.ResetMaterialKeywords(material);
}

#region Serialization_API
//Methods in this region interact on the serialized material
//without filtering on what used shader knows
Expand Down

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ public bool TryUpgradeFromMasterNode(IMasterNode1 masterNode, out Dictionary<Blo
// Previous master node wasn't having any renderingPass. Assign it correctly now.
systemData.renderingPass = systemData.surfaceType == SurfaceType.Opaque ? HDRenderQueue.RenderQueueType.Opaque : HDRenderQueue.RenderQueueType.Transparent;
systemData.alphaTest = eyeMasterNode.m_AlphaTest;
systemData.alphaTestDepthPrepass = eyeMasterNode.m_AlphaTestDepthPrepass;
systemData.alphaTestDepthPostpass = eyeMasterNode.m_AlphaTestDepthPostpass;
systemData.transparentDepthPrepass = eyeMasterNode.m_AlphaTestDepthPrepass;
systemData.transparentDepthPostpass = eyeMasterNode.m_AlphaTestDepthPostpass;
systemData.sortPriority = eyeMasterNode.m_SortPriority;
systemData.doubleSidedMode = eyeMasterNode.m_DoubleSidedMode;
systemData.transparentZWrite = eyeMasterNode.m_ZWrite;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ sealed partial class EyeSubTarget : LightingSubTarget, ILegacyTarget, IRequiresD
};

protected override string[] templateMaterialDirectories => passTemplateMaterialDirectories;
protected override string customInspector => "Rendering.HighDefinition.EyeGUI";
protected override string customInspector => "Rendering.HighDefinition.LightingShaderGraphGUI";
protected override string subTargetAssetGuid => "864e4e09d6293cf4d98457f740bb3301";
protected override ShaderID shaderID => HDShaderUtils.ShaderID.SG_Eye;
protected override string subShaderInclude => "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/Eye/Eye.hlsl";
Expand Down

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ sealed partial class FabricSubTarget : LightingSubTarget, ILegacyTarget, IRequir

protected override string[] templateMaterialDirectories => passTemplateMaterialDirectories;
protected override string subTargetAssetGuid => "74f1a4749bab90d429ac01d094be0aeb"; // FabricSubTarget.cs
protected override string customInspector => "Rendering.HighDefinition.FabricGUI";
protected override string customInspector => "Rendering.HighDefinition.LightingShaderGraphGUI";
protected override ShaderID shaderID => HDShaderUtils.ShaderID.SG_Fabric;
protected override string subShaderInclude => "Packages/com.unity.render-pipelines.high-definition/Runtime/Material/Fabric/Fabric.hlsl";
protected override string raytracingInclude => CoreIncludes.kFabricRaytracing;
Expand Down

This file was deleted.

Loading