Skip to content

Commit

Permalink
fix: fix VR namespace define conflict
Browse files Browse the repository at this point in the history
  • Loading branch information
alandtse committed Oct 9, 2024
1 parent 12b5f45 commit 3645674
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package/Shaders/ISApplyVolumetricLighting.hlsl
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ PS_OUTPUT main(PS_INPUT input)
{
PS_OUTPUT psout;

uint eyeIndex = VR::GetEyeIndexFromTexCoord(input.TexCoord);
uint eyeIndex = Stereo::GetEyeIndexFromTexCoord(input.TexCoord);
float2 screenPosition = FrameBuffer::GetDynamicResolutionAdjustedScreenPosition(input.TexCoord);
float depth = DepthTex.Sample(DepthSampler, screenPosition).x;

Expand Down
2 changes: 1 addition & 1 deletion package/Shaders/ISFullScreenVR.hlsl
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ PS_OUTPUT main(PS_INPUT input)
float2 uv = input.TexCoord; // Get the UV coordinates from input.

// Convert UV to normalized screen space [-1, 1].
float2 normalizedScreenCoord = VR::ConvertUVToNormalizedScreenSpace(uv);
float2 normalizedScreenCoord = Stereo::ConvertUVToNormalizedScreenSpace(uv);

// Calculate the length of the normalized screen coordinates.
float normalizedLength = saturate(Params1.x * (length(normalizedScreenCoord) - Params1.y) * Params0.x);
Expand Down
4 changes: 2 additions & 2 deletions package/Shaders/ISVolumetricLightingGenerateCS.hlsl
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,8 @@ cbuffer PerTechnique : register(b0)

float3 normalizedCoordinates = dispatchID.xyz / TextureDimensions.xyz;
float2 uv = normalizedCoordinates.xy;
uint eyeIndex = VR::GetEyeIndexFromTexCoord(uv);
float3 depthUv = VR::ConvertFromStereoUV(normalizedCoordinates, eyeIndex) + 0.001 * StepCoefficients[IterationIndex].xyz;
uint eyeIndex = Stereo::GetEyeIndexFromTexCoord(uv);
float3 depthUv = Stereo::ConvertFromStereoUV(normalizedCoordinates, eyeIndex) + 0.001 * StepCoefficients[IterationIndex].xyz;
float depth = InverseRepartitionTex.SampleLevel(InverseRepartitionSampler, depthUv.z, 0).x;
float4 positionCS = float4(2 * depthUv.x - 1, 1 - 2 * depthUv.y, depth, 1);

Expand Down

0 comments on commit 3645674

Please sign in to comment.