Skip to content

Commit

Permalink
fix: remove eye blending between eyes
Browse files Browse the repository at this point in the history
Some HMDs appear to have bad transformations so would experience
duplication.
  • Loading branch information
alandtse committed Sep 23, 2024
1 parent f9c6ea4 commit 0af4896
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions package/Shaders/Water.hlsl
Original file line number Diff line number Diff line change
Expand Up @@ -611,17 +611,6 @@ float3 GetWaterSpecularColor(PS_INPUT input, float3 normal, float3 viewDirection

bool validSSRMask = IsNonZeroColor(ssrReflectionColorRaw);

# ifdef VR
float3 otherEyeUV = ConvertStereoUVToOtherEyeStereoUV(float3(ssrReflectionUv, input.HPosition.z), a_eyeIndex, false);
float2 otherEyeUVDR = GetDynamicResolutionAdjustedScreenPosition(otherEyeUV.xy);

float4 otherEyeSSRColorRaw = RawSSRReflectionTex.Sample(RawSSRReflectionSampler, otherEyeUVDR);
float4 otherEyeSSRColorBlurred = SSRReflectionTex.Sample(SSRReflectionSampler, otherEyeUVDR);

ssrReflectionColorRaw = BlendEyeColors(ssrReflectionUvDR, ssrReflectionColorRaw, otherEyeUVDR, otherEyeSSRColorRaw, true);
ssrReflectionColorBlurred = BlendEyeColors(ssrReflectionUvDR, ssrReflectionColorBlurred, otherEyeUVDR, otherEyeSSRColorBlurred, true);
# endif

if (validSSRMask) {
// calculate blur on reflection
float effectiveBlurFactor = saturate(SSRParams.y * (1.0 + fogDensity));
Expand Down

0 comments on commit 0af4896

Please sign in to comment.