Skip to content

Commit

Permalink
Improve a bit liquid
Browse files Browse the repository at this point in the history
  • Loading branch information
alelievr committed Dec 18, 2023
1 parent 7451662 commit 18469a9
Show file tree
Hide file tree
Showing 8 changed files with 8,549 additions and 527 deletions.
5 changes: 4 additions & 1 deletion Assets/CustomPasses/Liquid/Liquid.cs
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,10 @@ protected override void Execute(CustomPassContext ctx)
return;
}

CustomPassUtils.DrawRenderers(ctx, layerMask);
var overrideDepth = new RenderStateBlock(RenderStateMask.Depth);
overrideDepth.depthState = new DepthState(false, CompareFunction.LessEqual);
CoreUtils.SetRenderTarget(ctx.cmd, ctx.customColorBuffer.Value, ctx.cameraDepthBuffer);
CustomPassUtils.DrawRenderers(ctx, layerMask, overrideRenderState: overrideDepth);

// Blur the custom buffer:
var resRadius = radius * ctx.cameraColorBuffer.rtHandleProperties.rtHandleScale.x;
Expand Down
2,640 changes: 2,588 additions & 52 deletions Assets/CustomPasses/Liquid/Liquid.shadergraph

Large diffs are not rendered by default.

23 changes: 11 additions & 12 deletions Assets/CustomPasses/Liquid/Liquid.vfx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ MonoBehaviour:
x: 357
y: -133
width: 1218
height: 2628
height: 2644
--- !u!114 &114350483966674976
MonoBehaviour:
m_ObjectHideFlags: 1
Expand Down Expand Up @@ -54,7 +54,7 @@ MonoBehaviour:
m_UIInfos: {fileID: 114340500867371532}
m_ParameterInfo: []
m_ImportDependencies: []
m_GraphVersion: 10
m_GraphVersion: 12
m_ResourceVersion: 1
m_SubgraphDependencies: []
m_CategoryPath:
Expand All @@ -78,9 +78,8 @@ VisualEffectResource:
m_PreWarmDeltaTime: 0.05
m_PreWarmStepCount: 0
m_InitialEventName: OnPlay
m_InstancingMode: 1
m_InstancingMode: -1
m_InstancingCapacity: 64
m_InstancingDisabledReason: -1
--- !u!114 &8926484042661614555
MonoBehaviour:
m_ObjectHideFlags: 0
Expand Down Expand Up @@ -527,7 +526,7 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
m_UIIgnoredErrors: []
m_Parent: {fileID: 114350483966674976}
m_Parent: {fileID: 0}
m_Children: []
m_UIPosition: {x: 0, y: 0}
m_UICollapsed: 1
Expand Down Expand Up @@ -1067,7 +1066,7 @@ MonoBehaviour:
- {fileID: 8926484042661614636}
- {fileID: 8926484042661614782}
- {fileID: 8926484042661614783}
m_UIPosition: {x: 1151, y: 1976}
m_UIPosition: {x: 1170, y: 1979}
m_UICollapsed: 0
m_UISuperCollapsed: 0
m_InputSlots:
Expand All @@ -1084,17 +1083,18 @@ MonoBehaviour:
m_OutputFlowSlot:
- link: []
blendMode: 3
cullMode: 0
zWriteMode: 2
zTestMode: 0
useAlphaClipping: 0
generateMotionVector: 0
excludeFromTAA: 0
excludeFromTUAndAA: 0
sortingPriority: 0
m_SubOutputs:
- {fileID: 8926484042661614630}
cullMode: 0
zWriteMode: 2
zTestMode: 0
colorMapping: 0
uvMode: 0
flipbookLayout: 0
useSoftParticle: 0
vfxSystemSortPriority: 0
sort: 0
Expand All @@ -1105,7 +1105,6 @@ MonoBehaviour:
frustumCulling: 0
castShadows: 0
useExposureWeight: 0
flipbookLayout: 0
needsOwnSort: 0
shaderGraph: {fileID: -5475051401550479605, guid: dcd703e07af617a4388fd9a2e8172388,
type: 3}
Expand Down Expand Up @@ -5680,7 +5679,7 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
m_UIIgnoredErrors: []
m_Parent: {fileID: 114350483966674976}
m_Parent: {fileID: 0}
m_Children: []
m_UIPosition: {x: 0, y: 0}
m_UICollapsed: 1
Expand Down
19 changes: 9 additions & 10 deletions Assets/CustomPasses/Liquid/NormalTestFX.vfx
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ MonoBehaviour:
m_UIInfos: {fileID: 114340500867371532}
m_ParameterInfo: []
m_ImportDependencies: []
m_GraphVersion: 10
m_GraphVersion: 12
m_ResourceVersion: 1
m_SubgraphDependencies: []
m_CategoryPath:
Expand All @@ -70,9 +70,8 @@ VisualEffectResource:
m_PreWarmDeltaTime: 0.05
m_PreWarmStepCount: 0
m_InitialEventName: OnPlay
m_InstancingMode: 1
m_InstancingMode: -1
m_InstancingCapacity: 64
m_InstancingDisabledReason: -1
--- !u!114 &8926484042661614555
MonoBehaviour:
m_ObjectHideFlags: 0
Expand Down Expand Up @@ -516,7 +515,7 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
m_UIIgnoredErrors: []
m_Parent: {fileID: 114350483966674976}
m_Parent: {fileID: 0}
m_Children: []
m_UIPosition: {x: 0, y: 0}
m_UICollapsed: 1
Expand Down Expand Up @@ -1066,17 +1065,18 @@ MonoBehaviour:
m_OutputFlowSlot:
- link: []
blendMode: 1
cullMode: 0
zWriteMode: 0
zTestMode: 0
useAlphaClipping: 0
generateMotionVector: 0
excludeFromTAA: 0
excludeFromTUAndAA: 0
sortingPriority: 0
m_SubOutputs:
- {fileID: 8926484042661614617}
cullMode: 0
zWriteMode: 0
zTestMode: 0
colorMapping: 0
uvMode: 0
flipbookLayout: 0
useSoftParticle: 0
vfxSystemSortPriority: 0
sort: 0
Expand All @@ -1087,7 +1087,6 @@ MonoBehaviour:
frustumCulling: 0
castShadows: 0
useExposureWeight: 0
flipbookLayout: 0
needsOwnSort: 0
shaderGraph: {fileID: 0}
materialSettings:
Expand Down Expand Up @@ -1230,7 +1229,7 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
m_UIIgnoredErrors: []
m_Parent: {fileID: 114350483966674976}
m_Parent: {fileID: 0}
m_Children: []
m_UIPosition: {x: 0, y: 0}
m_UICollapsed: 1
Expand Down
1,478 changes: 1,415 additions & 63 deletions Assets/CustomPasses/Liquid/Resources/ScreenSpaceDebugNormal.shadergraph

Large diffs are not rendered by default.

Loading

0 comments on commit 18469a9

Please sign in to comment.