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

Adding 0.0 to an expression causes significant visual difference #25

Closed
afd opened this issue Nov 28, 2016 · 2 comments
Closed

Adding 0.0 to an expression causes significant visual difference #25

afd opened this issue Nov 28, 2016 · 2 comments

Comments

@afd
Copy link
Member

afd commented Nov 28, 2016

[Shaders, screenshots, error log, reproduction steps, etc.] [ZIP]

Recipient:

recipient image

Variant:

variant image

The recipient and variant images are rendered by identical shaders, except in the variant shader this line:

    vec3 b = fract(sin(co.x * 0.3e-3 + co.y) * vec3(8.1e5, 1.0e5, 0.1e5));

is replaced by:

    vec3 b = fract(sin(co.x * 0.3e-3 + co.y) * (vec3(8.1e5, 1.0e5, 0.1e5) + vec3(injectionSwitch.x, 0.0, 0.0)));

At runtime, we set injectionSwitch to (0.0, 1.0), so adding vec3(injectionSwitch.x, 0.0, 0.0) should be like adding a vector of zeroes; i.e., it should have no effect. Yet making this change causes a visible difference in the image that is rendered.

@afd
Copy link
Member Author

afd commented Nov 28, 2016

Reported to ARM here:

https://community.arm.com/message/39861

@afd
Copy link
Member Author

afd commented Jul 19, 2017

Via email discussions with ARM, we agreed that this was a false alarm due to floating-point issues. We found this shader's variants led to different images on many platforms.

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