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

Improve glsl shader performance #211

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
Open

Improve glsl shader performance #211

wants to merge 9 commits into from

Conversation

uis246
Copy link
Collaborator

@uis246 uis246 commented Oct 11, 2024

Most optimizations are done by abusing mathematical properties and replacing slow on some hardware(e.g. Inetl) min and max with saturation.
For example dot product is in range [-1, 1], so max(0, dot(...)) = sat(dot(...)).
In places where this potentially can mess with HDR comments were added.

@uis246
Copy link
Collaborator Author

uis246 commented Oct 11, 2024

Riiight, forgot to rebase.

@uis246
Copy link
Collaborator Author

uis246 commented Oct 11, 2024

There is room for improvement, for example texture matrix, but it will require changing rendering code, so it will not be here for sake of simplicity.

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