Open MacroMachines opened 7 years ago
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?
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?
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?
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,
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!
axiomcrux@gmail.com might be better option, ill check if the invite came through
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:
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.