Skip to content

Commit

Permalink
Hdrp StackLit Advanced Specular Occlusion Config, Iridescence control…
Browse files Browse the repository at this point in the history
…, BentNormal fixup, CoatMask, Bugfixes (#3629)

* StackLit: Specular Occlusion: Enable full configuration of both screen space AO-based specular occlusion and data based (from AO input and bent normal) specular occlusion.

* StackLit: Add a tentative method to fix noisy parts of bent normal maps. Remove the main SO toggle in StackLit from the master node UI.

* StackLit: Tests: Update basic test shadergraphs (used by 1401_StackLitSG) along with the ones used by 1402  originally with SO disabled to use the same default specular occlusion configuration as Lit (empirical direct from AO formula for both SS and baked data), update resulting affected test, and resave all StackLit shadergraphs since SO has more settings now (config isn't changed for the rest of those shadergraphs).
Also update the SSS shadergraph to match the changes to diffusion profiles.

* StackLit: Test data and shader graph to experiment with bent normal fixup for SO.

* HDRP: BSDF: EvalIridescence: Fix an edge case where black artifacts could happen because of NaNs due to TIR and hidden possible numerical discrepancy between emitted code and apparent logic of source.

* StackLit: ComputeAdding core bottom variance calculations. Fix a double normalization error in the equations and modify the anisotropy correction function accordingly. Also add code to prevent some grazing angle acne.

* StackLit: Change reflection probe baking for specular tint: Factor out code to generate a specular tint for diverse code paths (eg specular occlusion) and use it to replace direct usage of bsdfData.fresnel0 when baking reflection probes.

* StackLit: Implement a coatmask feature. Also implement two iridescence fixup and control ports to ease interaction and usage with coat: FixupTIR, which was done before using another formula, but which is now improved and exposed: it automatically adjust the real topIOR used with EvalIridescence so that the whole angular range is filled up to - but not showing - TIR, regardless of iridescenceThickness, coatIOR and coatRoughness which all affect average refracted lobe direction stats and thus potential TIR conditions . FixupTIRClamp permits to fix the critical angle limit of iridescence even while iridescenceThickness is lowered, so that the changes in the angular color oscillations periods will "unroll" or stretch over a fixed angular range instead of going out of view past the grazing limit. This is for artistic control of the effect.

* StackLit: Tests: Update all test scenes materials, add new content for coatmask feature, iridescence fixup.

* StackLit: Specular Occlusion: Add option to specify visibility cone direction for SSAO-based SO when an advanced SO method is selected.

* LightLoop shadowbias: fix a potential light leak on the sun light, as the wrong normal is used to check the bias sign (for Lit, this could only happen in forward).

* HDRP_Tests - Touchup some StackLit scenes and materials and update reference screenshots.

* removed unused meta + update package.json

* Update EditorBuildSettings.asset

* StackLit screenshots update
  • Loading branch information
slunity authored and sebastienlagarde committed Jun 13, 2019
1 parent ddbf1cd commit dbfd46e
Show file tree
Hide file tree
Showing 90 changed files with 19,873 additions and 720 deletions.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ RenderSettings:
m_ReflectionIntensity: 1
m_CustomReflection: {fileID: 0}
m_Sun: {fileID: 0}
m_IndirectSpecularColor: {r: 0.056631908, g: 0.07966899, b: 0.1259163, a: 1}
m_IndirectSpecularColor: {r: 0.047471408, g: 0.06678139, b: 0.105670914, a: 1}
m_UseRadianceAmbientProbe: 0
--- !u!157 &3
LightmapSettings:
Expand Down Expand Up @@ -94,8 +94,8 @@ LightmapSettings:
m_PVRFilteringAtrousPositionSigmaDirect: 0.5
m_PVRFilteringAtrousPositionSigmaIndirect: 2
m_PVRFilteringAtrousPositionSigmaAO: 1
m_ShowResolutionOverlay: 1
m_ExportTrainingData: 0
m_TrainingDataDestination: TrainingData
m_LightingDataAsset: {fileID: 0}
m_UseShadowmask: 1
--- !u!196 &4
Expand Down Expand Up @@ -262,6 +262,7 @@ MeshRenderer:
m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1
m_ReceiveGI: 1
m_PreserveUVs: 0
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
Expand Down Expand Up @@ -696,12 +697,11 @@ MonoBehaviour:
m_GameObject: {fileID: 1330659247}
m_Enabled: 1
m_EditorHideFlags: 0
m_GeneratorAsset: {fileID: 0}
m_Script: {fileID: 11500000, guid: 441482e8936e35048a1dffac814e3ef8, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Profile: {fileID: 11400000, guid: fc9e408991e011b43aedcb95762c1cc0, type: 2}
m_BakingSkyUniqueID: 2
m_StaticLightingSkyUniqueID: 2
--- !u!114 &1330659249
MonoBehaviour:
m_ObjectHideFlags: 0
Expand All @@ -711,7 +711,6 @@ MonoBehaviour:
m_GameObject: {fileID: 1330659247}
m_Enabled: 1
m_EditorHideFlags: 0
m_GeneratorAsset: {fileID: 0}
m_Script: {fileID: 11500000, guid: 172515602e62fb746b5d573b38a5fe58, type: 3}
m_Name:
m_EditorClassIdentifier:
Expand Down Expand Up @@ -790,6 +789,11 @@ PrefabInstance:
propertyPath: field of view
value: 45
objectReference: {fileID: 0}
- target: {fileID: 20109210616973140, guid: c07ace9ab142ca9469fa377877c2f1e7,
type: 3}
propertyPath: m_Enabled
value: 1
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: c07ace9ab142ca9469fa377877c2f1e7, type: 3}
--- !u!1001 &1703845551
Expand Down Expand Up @@ -919,19 +923,40 @@ Light:
m_Bias: 0.05
m_NormalBias: 0.4
m_NearPlane: 0.2
m_CullingMatrixOverride:
e00: 1
e01: 0
e02: 0
e03: 0
e10: 0
e11: 1
e12: 0
e13: 0
e20: 0
e21: 0
e22: 1
e23: 0
e30: 0
e31: 0
e32: 0
e33: 1
m_UseCullingMatrixOverride: 0
m_Cookie: {fileID: 0}
m_DrawHalo: 0
m_Flare: {fileID: 0}
m_RenderMode: 0
m_CullingMask:
serializedVersion: 2
m_Bits: 4294967295
m_RenderingLayerMask: 1
m_Lightmapping: 4
m_LightShadowCasterMode: 2
m_AreaSize: {x: 1, y: 1}
m_BounceIntensity: 1
m_ColorTemperature: 6570
m_UseColorTemperature: 0
m_BoundingSphereOverride: {x: 0, y: 0, z: 0, w: 0}
m_UseBoundingSphereOverride: 0
m_ShadowRadius: 0
m_ShadowAngle: 0
--- !u!4 &1944080601
Expand All @@ -957,7 +982,6 @@ MonoBehaviour:
m_GameObject: {fileID: 1944080599}
m_Enabled: 1
m_EditorHideFlags: 0
m_GeneratorAsset: {fileID: 0}
m_Script: {fileID: 11500000, guid: c6c2871f720b2af4e9210febdac74517, type: 3}
m_Name:
m_EditorClassIdentifier:
Expand Down Expand Up @@ -1005,12 +1029,11 @@ MonoBehaviour:
m_GameObject: {fileID: 1944080599}
m_Enabled: 1
m_EditorHideFlags: 0
m_GeneratorAsset: {fileID: 0}
m_Script: {fileID: 11500000, guid: 7a68c43fe1f2a47cfa234b5eeaa98012, type: 3}
m_Name:
m_EditorClassIdentifier:
version: 3
m_Version: 3
version: 4
m_Version: 4
directionalIntensity: 3.1415927
punctualIntensity: 600
areaIntensity: 200
Expand All @@ -1027,7 +1050,7 @@ MonoBehaviour:
affectSpecular: 1
nonLightmappedOnly: 0
lightTypeExtent: 0
spotLightShape: 0
m_SpotLightShape: 0
shapeWidth: 0.5
shapeHeight: 0.5
aspectRatio: 1
Expand All @@ -1040,12 +1063,21 @@ MonoBehaviour:
showAdditionalSettings: 0
displayLightIntensity: 1
displayAreaLightEmissiveMesh: 0
areaLightCookie: {fileID: 0}
areaLightShadowCone: 120
evsmExponent: 15
evsmLightLeakBias: 0
evsmVarianceBias: 0.00001
evsmBlurPasses: 0
lightLayers: 1
shadowNearPlane: 0.1
shadowSoftness: 0.5
blockerSampleCount: 24
filterSampleCount: 16
minFilterSize: 0.00001
kernelSize: 5
lightAngle: 1
maxDepthBias: 0.001
--- !u!1 &2060143685
GameObject:
m_ObjectHideFlags: 0
Expand Down Expand Up @@ -1074,7 +1106,6 @@ MonoBehaviour:
m_GameObject: {fileID: 2060143685}
m_Enabled: 1
m_EditorHideFlags: 0
m_GeneratorAsset: {fileID: 0}
m_Script: {fileID: 11500000, guid: c6c2871f720b2af4e9210febdac74517, type: 3}
m_Name:
m_EditorClassIdentifier:
Expand Down Expand Up @@ -1122,12 +1153,11 @@ MonoBehaviour:
m_GameObject: {fileID: 2060143685}
m_Enabled: 1
m_EditorHideFlags: 0
m_GeneratorAsset: {fileID: 0}
m_Script: {fileID: 11500000, guid: 7a68c43fe1f2a47cfa234b5eeaa98012, type: 3}
m_Name:
m_EditorClassIdentifier:
version: 3
m_Version: 3
version: 4
m_Version: 4
directionalIntensity: 3.1415927
punctualIntensity: 600
areaIntensity: 200
Expand All @@ -1144,7 +1174,7 @@ MonoBehaviour:
affectSpecular: 1
nonLightmappedOnly: 0
lightTypeExtent: 0
spotLightShape: 0
m_SpotLightShape: 0
shapeWidth: 0.5
shapeHeight: 0.5
aspectRatio: 1
Expand All @@ -1157,12 +1187,21 @@ MonoBehaviour:
showAdditionalSettings: 0
displayLightIntensity: 600
displayAreaLightEmissiveMesh: 0
areaLightCookie: {fileID: 0}
areaLightShadowCone: 120
evsmExponent: 15
evsmLightLeakBias: 0
evsmVarianceBias: 0.00001
evsmBlurPasses: 0
lightLayers: 1
shadowNearPlane: 0.1
shadowSoftness: 0.5
blockerSampleCount: 24
filterSampleCount: 16
minFilterSize: 0.00001
kernelSize: 5
lightAngle: 1
maxDepthBias: 0.001
--- !u!108 &2060143688
Light:
m_ObjectHideFlags: 0
Expand All @@ -1187,19 +1226,40 @@ Light:
m_Bias: 0.05
m_NormalBias: 0.4
m_NearPlane: 0.2
m_CullingMatrixOverride:
e00: 1
e01: 0
e02: 0
e03: 0
e10: 0
e11: 1
e12: 0
e13: 0
e20: 0
e21: 0
e22: 1
e23: 0
e30: 0
e31: 0
e32: 0
e33: 1
m_UseCullingMatrixOverride: 0
m_Cookie: {fileID: 0}
m_DrawHalo: 0
m_Flare: {fileID: 0}
m_RenderMode: 0
m_CullingMask:
serializedVersion: 2
m_Bits: 4294967295
m_RenderingLayerMask: 1
m_Lightmapping: 4
m_LightShadowCasterMode: 2
m_AreaSize: {x: 1, y: 1}
m_BounceIntensity: 1
m_ColorTemperature: 6570
m_UseColorTemperature: 0
m_BoundingSphereOverride: {x: 0, y: 0, z: 0, w: 0}
m_UseBoundingSphereOverride: 0
m_ShadowRadius: 0
m_ShadowAngle: 0
--- !u!4 &2060143689
Expand Down
Loading

0 comments on commit dbfd46e

Please sign in to comment.