Add option to toggle GLSL preprocess #295
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Added a switch for shader preprocess, making it easier to understand the shader and get rid of any unnecessary distractions.
Test demo: https://hilo3d.js.org/examples/geometry_box.html
The builded extensions for test
extensions.zip
preprocess off:
![image](https://private-user-images.githubusercontent.com/800043/293243326-831a5c49-4f86-4794-926d-30ed76a6ae04.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjAxMjQxNjUsIm5iZiI6MTcyMDEyMzg2NSwicGF0aCI6Ii84MDAwNDMvMjkzMjQzMzI2LTgzMWE1YzQ5LTRmODYtNDc5NC05MjZkLTMwZWQ3NmE2YWUwNC5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwNzA0JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MDcwNFQyMDExMDVaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT00ZTU1ZTJlOTE4NzVkZDNlOWQzNTkzZGNhMmRlNTI4NjBlYWJkYTk4ZmM1ODk0MzQxN2IwNzdiOWUxYThlMzJl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