Skip to content

Conversation

@Kyborg2011
Copy link
Contributor

After such a little changes a debug app on both my Android 13 devices started working smoothly...

photo_2024-08-03 21 57 03
photo_2024-08-03 21 56 55

layout(location = 2) in vec4 transforms;
layout(location = 3) in vec2 center;
layout(location = 4) in vec2 distance;
layout(location = 3) in vec2 center2;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you please explain why changing this fixes it?

Copy link
Member

@kblaschke kblaschke Aug 4, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same question. The only explanation I could come up with is that Android's shader Compiler somehow has center and distance as keywords.

Edit: yeah, only OpenGL ES has a distance() function, so this would cause compilation issues. Actually haven't seen other GLES compilers give me an error, which is strange.

I'd not postfix those variables with a 2 in the case, as there's clearly no 1 here. We could instead rather prefix the variables with in_ or something, which would both fix the potential keyword issue and not make the names look weird.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess renaming the distance variable should suffice, as I cannot find any keyword or function center in any GL standard.

Could you try that, keeping center as-is and for example rename distance to warpDistance?

@kblaschke
Copy link
Member

I've changed the variable names according, keeping the commit info as-is otherwise.

Since we need to merge it into two branches (the fix will become part of the 4.1.2 release), there are now two new PRs open, #832 and #833. Closing this one here.

@kblaschke kblaschke closed this Aug 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants