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

Make gl_FrontFacing a top level shader variable #2

Open
dmnsgn opened this issue Jul 1, 2021 · 0 comments
Open

Make gl_FrontFacing a top level shader variable #2

dmnsgn opened this issue Jul 1, 2021 · 0 comments
Assignees

Comments

@dmnsgn
Copy link
Member

dmnsgn commented Jul 1, 2021

Why: problems appear with gl_FrontFacing when inside a function (https://bugs.chromium.org/p/chromium/issues/detail?id=1154842).

How:

  • Declare: float frontFacing = float(gl_FrontFacing) * 2.0 - 1.0;
  • And use frontFacing in material frag/depth pre pass shaders and in normal and clear coat chunks.
@dmnsgn dmnsgn added the bug label Jul 1, 2021
@dmnsgn dmnsgn self-assigned this Jul 1, 2021
@dmnsgn dmnsgn transferred this issue from pex-gl/pex-renderer Jul 5, 2022
@dmnsgn dmnsgn removed the bug label Jan 29, 2024
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

1 participant