Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Has issue with rendering in uneven scale of the viewport #74

Closed
tufeixp opened this issue Nov 27, 2023 · 4 comments
Closed

Has issue with rendering in uneven scale of the viewport #74

tufeixp opened this issue Nov 27, 2023 · 4 comments

Comments

@tufeixp
Copy link

tufeixp commented Nov 27, 2023

I tried to turn this into desktop 3D, it works but has this issue, the image looks "feathur" like:
image
scale any viewport of the left/right camera to w=1 instead of 0.5 will correct this looking.
I tried with both dual camera or MockHMD, both are the same result.
I guess is has something to do with the half-width pixel render support inside the shader code, please help to look into it.

@aras-p
Copy link
Owner

aras-p commented Nov 27, 2023

I'm not sure I understand the issue. Is this something about VR/XR? If so, I have exactly zero VR devices around, and no idea what could be wrong or where.

@tufeixp
Copy link
Author

tufeixp commented Nov 27, 2023

It's not related to VR/XR, only related to the off-axis frustum used to render half sided viewports, it can be viewed on any screen using some parallel viewing method, naked eye or with some lenticular glasses.

@aras-p
Copy link
Owner

aras-p commented Nov 27, 2023

Ah, so you're trying to use a non-standard (off-axis) projection matrix somehow? Yeah that probably does not work correctly right now, just like orthoghraphic camera does not (#25), I'm gonna close this as duplicate.

@aras-p aras-p closed this as not planned Won't fix, can't repro, duplicate, stale Nov 27, 2023
@tufeixp
Copy link
Author

tufeixp commented Nov 28, 2023

I have modified the shader code and now it looks correct now.
RenderGaussianSplats.shader:
float2 _sbsParams = float2(_ScreenParams.x * 2, _ScreenParams.y);
float2 deltaScreenPos = (quadPos.x * view.axis1 + quadPos.y * view.axis2) * 2 / _sbsParams;
o.vertex = centerClipPos;
o.vertex.xy += deltaScreenPos * centerClipPos.w * 2;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants