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

Y-Flip in Image pass causes inconsistencies #38

Open
Vipitis opened this issue Dec 20, 2024 · 0 comments
Open

Y-Flip in Image pass causes inconsistencies #38

Vipitis opened this issue Dec 20, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@Vipitis
Copy link
Collaborator

Vipitis commented Dec 20, 2024

mentioned in #30 (comment)

The finally y flipping of the image renderpass is done in the fragment stage. However this can lead to inconsistencies with some functions like dFdy.

A simple diagnostic repro has been provided by ttg via Discord:

void mainImage (out vec4 O, vec2 f) {
  vec2 u=f/iResolution.xy;
  float x= u.x<.5 ? f.y : float(int(f.y+u.x*4.)/2);
  int i=int(u.x*4.);
  O.xy=dFdy(vec2(1,-1)*x);
  O.z=float(fract(u.x*8.)<.04);
}

Solutions to explore:

  • ignore it (maybe add notice)
  • rewrite rules
  • flipping the output in CPU
  • additional render/compute pass
  • find a solution to do it in the gui?
@Vipitis Vipitis added the bug Something isn't working label Dec 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant