Giter Site home page Giter Site logo

rollup-plugin-glsl's People

Contributors

attilahorvath avatar danmarshall avatar dekdevy avatar naridal avatar vwochnik avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

rollup-plugin-glsl's Issues

Compression converts `else if` to `elseif`

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!

Support extensions other than .glsl

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?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.