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

Holographic transform mirror hack is causing shading bugs #132

Open
mlfarrell opened this issue Sep 3, 2017 · 1 comment
Open

Holographic transform mirror hack is causing shading bugs #132

mlfarrell opened this issue Sep 3, 2017 · 1 comment

Comments

@mlfarrell
Copy link

Behold, my latest hack removal target:

                // TODO: The display was being mirrored, so for now we hack these values to 
                //       negative as far as the app is concerned.
                viewTransform.Left.M11 = -viewTransform.Left.M11;
                viewTransform.Left.M12 = -viewTransform.Left.M12;
                viewTransform.Left.M13 = -viewTransform.Left.M13;
                viewTransform.Right.M11 = -viewTransform.Right.M11;
                viewTransform.Right.M12 = -viewTransform.Right.M12;
                viewTransform.Right.M13 = -viewTransform.Right.M13;
                mMidViewMatrix._11 = -mMidViewMatrix._11;
                mMidViewMatrix._12 = -mMidViewMatrix._12;
                mMidViewMatrix._13 = -mMidViewMatrix._13;

This is causing gl_FrontFacing to be incorrectly mirrored w.r.t the x axis in all of my shaders. Is there a better way to handle this?

@mlfarrell
Copy link
Author

Oddly enough, commenting this has no effect on my shading at all. So less critical issue, but would be good to phase out the above code entirely still..

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

No branches or pull requests

2 participants