8000 Document current design limitations by eldritchconundrum · Pull Request #294 · laurentlb/shader-minifier · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Document current design limitations #294

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -767,6 +767,30 @@ There are two renaming strategies:
Renaming variables and functions in a compression-friendly way is difficult.
Future versions of Shader Minifier may use different heuristics.


## Current limitations

- Macros can arbitrarily change the code. Shader Minifier does not try to
take into account how the future effects of macro expansion interact
with minification, and assumes that the source code is valid and can be
understood and minified before macro expansion. This can result in
minification breaking the code.

- Function overloading is not well supported yet, in particular when the
number of arguments is not enough to disambiguate.
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we already have sections on Macros and Overloading


- In the context of demoscene, the compressed size of a shader is more
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove In the context of demoscene.

But maybe move the text under the section Automatic inlining?

Shader Minifier considers that the compressed size of a shader is more

important than the uncompressed size. As a result, Shader Minifier makes
some assumptions that favor minimizing the compressed size of the minified
shader. In some cases, the uncompressed size of the output the can end up
larger than the input.

- Shader Minifier tries to support GLSL and HLSL. Supporting similar but
different languages means that it's not always possible to take full
advantage of all minification possibilities, and that the less often used
corners of a language might have undetected bugs.


## Feedback

Please give feedback in the [bugtracker](https://github.com/laurentlb/Shader_Minifier/issues).
Expand Down
0