Conversation
|
I'm still not convinced a noise texture is a good idea. TAA heavily relies on color clamping to prevent ghosting, which just utterly fails on such tiny high frequency detail. I don't think it's a realistic test of TAA. Moving transparencies would be a more realistic example of a torture test imo. |
|
The artifacts that this test reveal are representative of artifacts I've seen using the TAA implementation in bevy main in actual highly detailed scenes. (though they are somewhat exaggerated in this test scene) I think it would be beneficial to additionally have tests that involve alpha blend materials, but TAA features designed for handling alpha blend are largely unrelated to the issues I've been having, that are illustrated by this example scene. |
superdump
left a comment
There was a problem hiding this comment.
Aside from leaning on argh and the bevy_ci_testing feature for screenshots and exiting after a number of frames, I think the noise texture is a useful stress test for 'high frequency' (noisy) textures, and the moving camera are for sure useful.
| .insert_resource(Msaa::Off) | ||
| let mut app = App::new(); | ||
| let mut movement_settings = CameraMovementSettings::default(); | ||
| if std::env::args().nth(1).unwrap_or_default() == "--screenshot_taa" { |
There was a problem hiding this comment.
You could use the argh crate for CLI stuff if you prefer. It may be useful for continuous integration / regression test automation to be able to specify which anti-aliasing mode is used. The CI functionality also supports making screenshots at a particular frame. So maybe that's the route to take here.
For example, if you build with the bevy_ci_testing feature, you can write (exit_after: Some(1500), screenshot_frames: [1234], frame_time: Some(0.0167)) to a .ron file, and then run the example with CI_TESTING_CONFIG=/path/to/my_config.ron and it will run the example for that many frames, with a fixed delta time, taking screenshots at the specified frame(s).
There was a problem hiding this comment.
I would like the test (at least in its current state) to use the frame I specified. Should I add exit_after, screenshot_frames to the CLI options, and also like a test flag, or just have the frame I care about the the default? Do these CLI options need to exist for bevy_ci_testing to work or does that work regardless of what options I add?
There was a problem hiding this comment.
I think I ultimately want to have a set of test scenarios. Like moving the camera side to side, moving the helmets around but keeping the camera in place, etc...
Objective
This PR updates the anti_aliasing example with a noise texture and camera movement to illustrate potential issues with TAA. It also features a screenshot mode to consistently capture the scene with camera movent independent of the frame rate.