vwochnik / rollup-plugin-glsl Goto Github PK
View Code? Open in Web Editor NEWConverts GLSL shader source files to modules
License: MIT License
Converts GLSL shader source files to modules
License: MIT License
H, I noticed that compressing this shader code:
}else
if (mode == 1.0){ // GROW
offsetStrength *= 0.25;
Results in the following string:
}elseif(mode==1.0){offsetStrength*=0.25;
Where else if
is converted to elseif
I'm guessing this is unintentional. My understanding is that elseif is not valid syntax for GLSL, or at least not widely supported. I realize having else if
on separate lines is also strange, but I'm working with a large legacy codebase and figured compression shouldn't impact the output, as long as the input is valid.
Thanks for looking into this!
Hi,
Is there any particular reason why this plugin only accepts files with .glsl
extension?
I'm more used to working with .vert
/.frag
for my shaders (as those seem to be preferred by the official Khronos tools), while some other people prefer .vs
/.fs
or many other options (see here for example).
I'm thinking about opening a pull request to whitelist at least these extensions but I'm just wondering whether this plugin should care about extensions in the first place or just allow any file to be processed (based on the include
option). What are your thoughts on this?
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.