Skip to content
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

Roadmap ideas for ISF v3 #14

Open
MacroMachines opened this issue Oct 11, 2017 · 7 comments
Open

Roadmap ideas for ISF v3 #14

MacroMachines opened this issue Oct 11, 2017 · 7 comments

Comments

@MacroMachines
Copy link

I forked the repo today, have some big plans in the works to grow ISF:

Gather vs and fs into one '.isf' file ( I notice many times I copy only the fs and get errors, also this seems more elegant as well as descriptive and searchable )

Make vertex pass more useful: reference vertexshaderart.com:
https://github.com/greggman/vertexshaderart
so much can be done and very computationally efficient. Requires gl_vertexID input, opengl rendermodes, and point size. Creates particles and geometry that is quick and powerful.

Compatibility / tie in with shaderfrog, I showed him your spec as a solution to what he is doing and to facilitate fluid compatibility with three.js

Update ShaderToy API import : plan to have a meeting with him to see if we could set up a more direct compatibility, and am experimenting with my own solutions at the moment via their API json files and regex.

A few months back, before I discovered ISF, I was creating a simple and elegant solution to the same thing that parses any glsl shader and defines controls and passes based on the uniforms. I plan to put this up on a github repo very soon, it provides immediate compatibility with any GLSL file and I and am exploring options to merge that into ISF.

@msfeldstein
Copy link
Owner

These are good ideas. I like bundling everything into one file, it would be great to figure out how to do textures as well. I've been playing with gltf format a lot lately and i love their glb bundle format to get everything into a single file. Alternatively we can make a zip file with an .isf or .zisf extension with everything in it.

Who are you meeting at ShaderToy with?

@MacroMachines
Copy link
Author

heya, I am about to have some time to dedicate to helping out with this, gald you like the ideas :)

a couple others ive had since:
Hexler's new Kodelife 0.5 is pretty awesome, the new version has loads of similarities to ISF, and a few nice differences. I like the new UI / way that it manages custom uniorms and multiple layers/ passes, and it has model import. The midi support is pretty cool as well, and I think there might be some lua scripting that I havent dug into yet. I am talking with him a bit on the cables.gl slack to hopefully open his mind to adopting / growing ISF.

I think it would benefit everyone if we can unify. This cross platform format with a few advancements could hopefully become a more common standard, as i see it has applications in videogames and three.js/webgl.

The idea with contacting IQ at shadertoy was that I noticed there are useful benefits if ISF on all sides, if shadertoy were to adopt this, it would allow for more control, and if ISF could natively parse the json export of the shadertoy api, it would become much easier to add controls.

The one other main use ive been finding, ive been working with kineticcreations.com on some ISF programming for use in millumin with multiple projectors / mapping and kinect. I am trying to think of a good way to support a "text" / "string" input in isf v3, i think dynamic text has vast implications for motiongraphics, and there are great examples in shadertoy. The current way of achieving this requires alot of #defines for each letter, newline and space, and then editing the main() in the shader with things like "T SP E SP X SP T NL" which isn't very end user friendly. The main way i have thought to do this thus far would requre the addition of a Javascript block that could regex in a bunch of characters like this, or optionally could create a more common 2D/3D text rendering approach. I am doing a bit more R&D on the specifics.

I will be available to make progress on realizing these goals starting in 2018, ive been brushing up on javascript, and already have a good handle on regex, glsl and shadertoy api.

Do you happen to have a slack or is there another way i could contact you to expedite this collab / diacuss details?

@MacroMachines
Copy link
Author

MacroMachines commented Dec 27, 2017

I also wanted to address some caveats and ask a question:
@mrRay what is the 'IDENTITY" property? cant seem to find any info or anyone using it, and for the life of me cant seem to figure out what it is meant to do.

caveat fix: i think it would be good to support native texture/2D/rect, it is the one place i always find myself addressing loads of errors in translating shaders, and I dont really understand the crux of why this is an issue. IMG_PIXEL() is cool, but maybe with a mix of my afformentioned regex code i made to search for native uniforms, the vast number of shaders out there could be instantly compatible. Is there anything i might be overlooking with this?

@MacroMachines
Copy link
Author

MacroMachines commented Dec 27, 2017

stripped down core of my lua/regex for finding uniforms:

for UNIFORM in string.gmatch ( self.m.shader.fragmentProgram, 'uniform%s(%w.-)\n') do
-- look for uniform and grab up till new line

        local TYPE, NAME = string.match(UNIFORM, '(%w.-)%s(%w.-);')      
   -- look for type and name of uniform

        if TYPE == 'lowp' or TYPE == 'mediump' or TYPE == 'highp' then     
   -- look if there might be a precision

            TYPE, NAME = string.match(NAME, '(%w.-)%s(%w.-)$')             
 -- adjust name if so

        end        
        local MIN, MAX, INIT = string.match( UNIFORM, '%s//%s([%-%.%d].-),%s([%.%-%d].-),%s([%.%-%d].-)$')     
 -- look for min/max/init comment

        if MIN == nil then MIN,MAX,INIT = 0.0, 1.0, 0.5  end        
  -- default if there is no min/max/ init comment after 

        self:addUniform( NUM, TYPE, NAME, MIN, MAX, INIT)    
-- function to sort cases and make sliders

end

ill polish up the rest and post soon along with forking the relevant isf implimentations for advancing,

@msfeldstein
Copy link
Owner

sweet, we just started up a slack for ISF chatter, I added your email in your profile let me know if there's a better one.

Happy new year!

@MacroMachines
Copy link
Author

axiomcrux@gmail.com might be better option, ill check if the invite came through

@MacroMachines
Copy link
Author

MacroMachines commented Nov 20, 2020

I propose as a main new feature in the new ISF 3 format:
a variable type LFO that generates a time cycling signal with a ramp, by wrapping an external phase accumulator in the code outside the glsl, with controls for:

  • RATE which would externally multiply the accumulator outside the ISF shader code in order to avoid stutters when adjusting rate multipliers inside the code which currently happens. This could also have an option for BPM based rates and a global BPM variable.
  • A float for SCALE could be added using the current float sliders and a multiplier inside the glsl.
  • A dropdown for TYPE could be added using another dropdown variable that creates a list of types, and then the programmer can select through and decide how to use that

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants