Giter Site home page Giter Site logo

gml_shaders's Introduction

GML+GLSL

Today I ported the GML math functions to GLSL. Common functions like point_distance, dcos, angle_difference and even irandom. See the code here.

gml_shaders's People

Contributors

xordev avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

sigmarik

gml_shaders's Issues

Module-local variable `seed` blocks commonly used variable name

There is a strict taboo on the word seed used as a function, variable or structure name in any project that uses this module.

That's because the name seed is already used in your module as a global variable. On top of that, there is no indication that the float variable seed is crucial for your random system and, therefore, should not be modifiable by the user of this library. Many C libraries that do use such variable tend to name them accordingly, all-caps with leading underlines (as opposed to snake case used for local variables).

Suggestion: why not make all the macros inline-ish functions?

There is no reason for any of these macros to be functions, especially considering they will most likely be in-placed by the compiler.

Making them functions will also increase their performance, as their parameters will not be recalculated for every use. Speaking of recalculations, there are also cases where macros like these are unusable no matter their bracket enclosure (any impure function will break if passed as any multi-use parameter of any macro).

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.