shader-park / shader-park-core

A JavaScript library for creating real-time 2D and 3D shaders. JS -> Shader. https://shaderpark.com/ https://twitter.com/shaderpark

Home Page:https://shaderpark.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add ISF Format Export

torinmb opened this issue · comments

Replace all uniforms with the ISF standard, so our SDFs can be dropped into other platforms like VDMX and Max MSP and have sliders / UI auto-generated.

https://www.interactiveshaderformat.com/

/*{
	"CREDIT": "by username",
	"DESCRIPTION": "",
	"CATEGORIES": [
		"XXX"
	],
	"INPUTS": [
		{
			"NAME": "inputImage",
			"TYPE": "image"
		},
		{
			"NAME": "floatInput1",
			"TYPE": "float",
			"DEFAULT": 0.5,
			"MIN": 0.0,
			"MAX": 1.0
		},
		{
			"NAME": "floatInput2",
			"TYPE": "float",
			"DEFAULT": 0.5,
			"MIN": 0.0,
			"MAX": 1.0
		},
		{
			"NAME": "floatInput3",
			"TYPE": "float",
			"DEFAULT": 0.5,
			"MIN": 0.0,
			"MAX": 1.0
		},
		{
			"NAME": "floatInput4",
			"TYPE": "float",
			"DEFAULT": 0.5,
			"MIN": 0.0,
			"MAX": 1.0
		},
		{
			"NAME": "floatInput5",
			"TYPE": "float",
			"DEFAULT": 0.5,
			"MIN": 0.0,
			"MAX": 1.0
		}
	]
}*/

Is there a js library for parsing this format? If so we could just replace our current method of passing a uniforms dictionary

Yeah, I'm basically using my own version of ISF to store the uniforms right now, so I should just switch to ISF. Looks like there's a helper library: https://github.com/msfeldstein/interactive-shader-format-js