docd27 / rollup-plugin-glsl-optimize Goto Github PK
View Code? Open in Web Editor NEWImport GLSL source files. Pre-processed, validated and optimized with Khronos Group SPIRV-Tools. Supports glslify.
License: MIT License
Import GLSL source files. Pre-processed, validated and optimized with Khronos Group SPIRV-Tools. Supports glslify.
License: MIT License
I'm trying to use your plugin and get the following error:
Error: While loading the Rollup configuration from "rollup.config.js", Node tried to require an ES module from a CommonJS file, which is not supported. A common cause is if there is a package.json file with "type": "module" in the same folder. You can try to fix this by changing the extension of your configuration file to ".cjs" or ".mjs" depending on the content, which will prevent Rollup from trying to preprocess the file but rather hand it to Node directly.
changing my config file to mjs did not work because then I can't import variables from package.json (because the json rollup plugin no longer gets transpiled for the config).
Any tips for how I can get this to work?
Hi there,
We're using glslify in our Rollup config, but I'd also like to integrate SPIRV optimizations as well. As of now, the import
in our codebase will correctly invoke glslify but then I believe the contents are being replaced with the resulting string, so by the time glsl-optimize's plugin gets hit, there's no Vinyl record that is a .glsl file and thus nothing gets run through the optimizer.
What's the best way to handle the combinations of these plugins? I'm having trouble even telling if the plugin is running or doing anything (Rollup's debugging capabilities seem to be lacking here).
Any advice? Thanks so much!
Interesting project!
Unfortunately I've found that unless I set optimize: false
then it results in different behavior in one of my shaders (specifically one thats doing transform feedback).
Process works fine once optimize is disabled,but I found that even just disabling the SPIRV optimizer pass with optimizerDebugSkipOptimizer
sadly didn't work so I'm assuming its something to do with the cross compilation step.
Do you have any advice for how to debug?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.