FXAA #8

Closed
opened 2024-03-23 15:41:31 +00:00 by SeanOMik · 1 comment
Owner

For now, FXAA could be implemented, later on I can implement TAA or something else.

Resources:

For now, FXAA could be implemented, later on I can implement TAA or something else. Resources: * https://blog.simonrodriguez.fr/articles/2016/07/implementing_fxaa.html
SeanOMik added the
Kind/Feature
label 2024-03-23 15:41:31 +00:00
Author
Owner

This is now implemented! It took a while, largely because it was blocked by the render graph (#15) and then I had to figure out a good way to swap out render targets for nodes without having to modify the code of the nodes; making it possible to render to an off screen texture which the FXAA pass would input.

What I figured out was to have two "chain" textures that can be swapped between each other. One would be rendered to by the meshes pass, then the FXAA pass would input that texture and output to the other texture. The other texture would become the "active" texture which is what would be copied to the surface at the end of the graph.

Sponza Before:
no_fxaa_sponza.png

Sponza After:
fxaa_sponza.png

This is now implemented! It took a while, largely because it was blocked by the render graph (#15) and then I had to figure out a good way to swap out render targets for nodes without having to modify the code of the nodes; making it possible to render to an off screen texture which the FXAA pass would input. What I figured out was to have two ["chain" textures](https://git.seanomik.net/SeanOMik/lyra-engine/src/commit/c4aebdb25dc479cba3b3c6b6f29973944194b432/lyra-game/src/render/graph/render_target.rs#L271) that can be swapped between each other. One would be rendered to by the meshes pass, then the FXAA pass would input that texture and output to the other texture. The other texture would become the "active" texture which is what would be copied to the surface at the end of the graph. Sponza Before: ![no_fxaa_sponza.png](/attachments/80657c44-ba8d-4da0-a92e-81b871a734d9) Sponza After: ![fxaa_sponza.png](/attachments/b9dd0f2c-eead-4541-a461-31175ff2bb4b)
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: SeanOMik/lyra-engine#8
No description provided.