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

Postprocessingstack/k upgrade #8064

Draft
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

kaychang-unity
Copy link
Contributor

@kaychang-unity kaychang-unity commented Apr 18, 2024


Purpose of this PR

These are various optimisations for the post-processing-stack.
They improve the GPU performance, quality and usability of the post processing effects.
The outputs of the post-processing effects are different and so are not backward compatible.

This is a pet-project for personal use.

Depth-of-Field

  • Dynamic selection of number of samples.
    This makes the performance of the effect depending on the number of blur on screen.
    Performance improved by 40% on typical scenes.
  • Shader code optimisation.
    Moved some calculations inside the loop generating the bokeh samples as uniform.; moved some temp variables to half; replaced some divisions by multiplications: 7% improvement.
  • Manual unrolling of the loop generating the bokeh samples: 15% improvement
  • TODO: kernel size parameters is resolution-independent and support up to 4k screen resolution (8 kokeh rings)
  • TODO: remove margin code (further improve performance, fix small bokeh denial)
  • TODO: Change ring sampling pattern
  • TODO: Change color accumulation formula
  • TODO: improve sharpness for in-focus pixels and avoid bleeding toward out-of-focus pixels
  • TODO: add tilt-shift
  • TODO: add bokeh shapes (blade count)

Testing status

TODO


Comments to reviewers

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.

1 participant