Skip to content
Merged
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
5 changes: 3 additions & 2 deletions package/Shaders/ISWaterBlend.hlsl
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ SamplerState depthBufferSampler : register(s3);
SamplerState waterMaskSampler : register(s4);

Texture2D<float4> sourceTex : register(t0);
Texture2D<float4> waterHistoryTex : register(t1);
Texture2D<float3> waterHistoryTex : register(t1);
Texture2D<float4> motionBufferTex : register(t2);
Texture2D<float4> depthBufferTex : register(t3);
Texture2D<float4> waterMaskTex : register(t4);
Expand Down Expand Up @@ -46,12 +46,13 @@ PS_OUTPUT main(PS_INPUT input)
float3 waterHistory =
waterHistoryTex.Sample(waterHistorySampler, motionAdjustedScreenPosition).xyz;

float historyMask = waterMaskTex.Sample(waterMaskSampler, motionAdjustedScreenPosition).z;
float3 finalColor = sourceColor;
if (
# ifndef VR
motionScreenPosition.x >= 0 && motionScreenPosition.y >= 0 && motionScreenPosition.x <= 1 &&
# endif
motionScreenPosition.y <= 1 && any(waterHistory)) {
motionScreenPosition.y <= 1 && historyMask > 0.999) {
float historyFactor = 0.95;
if (NearFar_Menu_DistanceFactor.z == 0) {
float depth = depthBufferTex.Sample(depthBufferSampler, adjustedScreenPosition).x;
Expand Down
Loading