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

Allow disabling jitter #628

Closed
wants to merge 6 commits into from
Closed

Conversation

Codezigineer
Copy link

Jitter is what makes raytracers grainy, by shooting pixels at slightly different directions than normal. This allows disabling it, for tasks that don't need it.

@gkjohnson
Copy link
Owner

Hello! Thanks for the contribution.

Jitter is what makes raytracers grainy, by shooting pixels at slightly different directions than normal. This allows disabling it, for tasks that don't need it.

Can you provide some screenshots of cases where this disabling jitter helps with the final image and how? Jitter is effectively performing antialiasing - it can contribute to the graininess but every ray bounce is scattered in a random direction regardless of this perpixel jitter which is primarily where the graininess should be coming from.

@Codezigineer
Copy link
Author

Codezigineer commented Apr 20, 2024

https://www.shadertoy.com/view/4ljGRd is an example. Some tasks don't need jitter. Not only that, FXAA can run over raytracing without any major impact. Here's an example of FXAA:

capture.2.webm

@gkjohnson
Copy link
Owner

https://www.shadertoy.com/view/4ljGRd is an example. Some tasks don't need jitter.

This is a very different kind of ray tracer, though. There is no randomness used anywhere and all diffuse lighting is calculated analytically rather than stochastically with random rays. Removing the pixel jitter from this project shouldn't result in the same kind of result.

What's the motivation for this PR? Are you using this for a project and need this change? Do you have screenshots showing what a render looks like before and after so I can understand how disabling the jitter affects the image?

@Codezigineer
Copy link
Author

I made this for a project I am working on, that I'm specifically using raytracing because RectArealights don't have shadows. Yes that is the only reason.

@gkjohnson
Copy link
Owner

Got it - without a demonstration showing the improvements that this PR will bring to the project I won't be able to merge it. I don't think this will address any of the graininess issues in the image generation due to random sampling.

@gkjohnson
Copy link
Owner

Closing this until it can be shown that there's an improvement to image quality.

@gkjohnson gkjohnson closed this Apr 28, 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

Successfully merging this pull request may close these issues.

2 participants