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

Feature Request: Set random seed for deterministic rendering #7831

Open
nimrod-gileadi opened this issue May 7, 2024 · 2 comments
Open

Feature Request: Set random seed for deterministic rendering #7831

nimrod-gileadi opened this issue May 7, 2024 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@nimrod-gileadi
Copy link
Contributor

Is your feature request related to a problem? Please describe.

I'm using Filament for off-screen batch rendering. It would be useful for me to have deterministic results, where rendering the same view twice results in the same pixel.
For the scene I'm using, I'm able to achieve this by disabling dithering, but it would be nice to have dithering, and just be able to set the seed before I call Renderer::render.

Describe the solution you'd like
This could be achieved by making FEngine::getRandomEngine a public method of Engine (so I could call engine->getRandomEngine().seed(1234)), or you could have a narrower interface with one function for setting the seed between render calls.

Describe alternatives you've considered

Disabling dithering (my current solution), or casting Engine* to FEngine* to get access to getRandomEngine().

@romainguy
Copy link
Collaborator

Dithering doesn't use a random seed but it's based on elapsed time.

@nimrod-gileadi
Copy link
Contributor Author

Thanks for the correction. Is there a way for a client to explicitly set the time used for dithering?

@pixelflinger pixelflinger self-assigned this May 8, 2024
@pixelflinger pixelflinger added the enhancement New feature or request label May 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants