-
-
Notifications
You must be signed in to change notification settings - Fork 68
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Glshaders in ronin #122
base: master
Are you sure you want to change the base?
Glshaders in ronin #122
Conversation
This is very nice, almost perfect ;) The simplest way would be to be able to load shaders, like we're currently loading an image, so it's kept in the Source module(source.js), and linked into the lisp file. Do you want to try and make it so you can load shaders instead of storing kaleid as a js function? |
Thanks! That is a really cool idea. The user could load in a shader and
then use it however they want. I wonder how arguments could be bound to the
shader (for example the number of sides in the kaleidescope).
I'll take another shot at it. Maybe the user could reference a json file
on their machine that contains the argument types and the shader code
…On Thu, Apr 2, 2020, 5:56 PM Devine Lu Linvega ***@***.***> wrote:
This is very nice, almost perfect ;)
I was wondering for the kaleid shader, I don't think the way to go is to
add new changes to the source everytime you want to add a new shader, the
idea would be to do this in lisp space.
The simplest way would be to be able to load shaders, like we're currently
loading an image, so it's kept in the Source module(source.js), and linked
into the lisp file. Do you want to try and make it so you can load shaders
instead of storing kaleid as a js function?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#122 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABEYDSX3BV2TBGPN3IXF3I3RKUCXDANCNFSM4L23HGZQ>
.
|
What if it worked like this?
Where the "kaleid.shader.json" was a file defining the shader code and the meta-data required to tell Ronin how to bind its arguments and attributes. Here is a gist describing how the shader.json might look. I think this solves the problem of not having to change the source code of Ronin every time you want a new shader. However, there are things I don't love about this approach:
Anyway, I would love to hear what you think. :) |
I took a shot at implementing what I described above. It seemed to work pretty good! I updated the
There are probably other ways to solve this problem that I'm not seeing. There are also some improvements on this that would be easy to make, such as adding a default vertex shader that binds the canvas and the frame. |
…e last arg be the selected rectangle by default
…e last arg be the selected rectangle by default
I'm a bit swamped at the moment, give me a day or two to look this over :) |
No problem and no rush. Sorry I kept spamming the thread. I think I may have problem sniped myself with this one. :) I hope your well and staying safe. |
Hi @neauoire,
I took a shot at cleaning up the gl tools and packaging them up in their own module.
I also made a library function called
kaleid
that makes a kaleidoscope of the current image on the canvas. It was helpful to have a concrete example to build toward.This was fun to play with and I'm happy to iterate on this more!
I'd love to hear what you think.
Thanks,
David