Previous topicNext topic

Issues and pain points when developing ISF shaders in Magic

Questions, comments, feedback, etc.
Post Reply
gorbados
Posts: 5
Joined: Fri Dec 09, 2016 3:46 am

Issues and pain points when developing ISF shaders in Magic

Post by gorbados »

Hi everyone,
I’ve been working quite a lot with ISF shaders in Magic recently, mostly feedback-based simulations (SmoothLife, reaction–diffusion–style systems, multi-pass cellular automata), and I wanted to share a few recurring issues I keep running into.
Posting this both as feedback and to see if others have similar experiences or workarounds.

1. Silent JSON header parsing failures

Small mistakes in the ISF JSON header (extra comma, conflicting INPUT / TARGET names, unsupported combinations) often don’t produce any visible error.
Instead, the shader may still load but:

some parameters disappear,

UI controls stop responding,

or behavior becomes inconsistent.

Because there’s no warning or error message, it’s very hard to understand that the real issue is the header, not the GLSL code.

2. INPUT vs PASS TARGET name collisions

It’s easy to accidentally declare the same name as both an INPUT (image) and a PASS TARGET (feedback buffer).
When this happens, Magic doesn’t complain, but the shader/UI breaks in non-obvious ways.
Some kind of validation or warning for name collisions would help a lot.

3. long parameters without VALUES/LABELS are confusing

Using TYPE: "long" without explicitly defining VALUES and LABELS can result in parameters that technically exist but are impossible or very unintuitive to change in the UI.
This is especially problematic for enum-style parameters (mode switches, simulation states).
Clearer rules or stricter validation here would reduce a lot of trial-and-error.

4. Fragile and undocumented FRAMEINDEX behavior

Initialization logic often only works reliably with checks like FRAMEINDEX < 2 instead of < 1.
This is surprising and undocumented, and it makes deterministic initialization and reset logic hard to reason about, especially for generative simulations.

5. Difficult debugging of multi-pass feedback setups

When something goes wrong in a multi-pass shader:

there’s no easy way to preview intermediate passes,

no indication if a pass isn’t running,

no warnings for invalid data (NaNs, missing textures, etc.).

Even very lightweight debugging or diagnostics tools would make developing complex feedback systems much easier.

6. Lack of ISF-specific validation / diagnostics

Many of the hardest errors are not GLSL errors, but ISF-structure errors (header syntax, passes, persistence, texture usage).
At the moment these tend to fail silently, which significantly increases iteration time.

Overall, Magic is an incredibly powerful tool for generative and simulation-driven visuals, but these issues make advanced shader development more fragile than it needs to be. Even optional validation messages or a “strict / debug mode” for ISF would already be a big improvement.

Curious if others have run into the same problems, or if there are best practices I’m missing.
Terry Payman
Posts: 818
Joined: Sun Sep 14, 2014 8:15 am
Location: UK
Contact:

Re: Issues and pain points when developing ISF shaders in Magic

Post by Terry Payman »

VIDVOX created the ISF format, and I've found the VIDVOX ISF editor very useful for debugging if an ISF does not compile in Magic. Their compiler highlights all lines with errors, identifies JSON errors and has an option for displaying a chosen rendering pass.

It does have some UI "bugs".
I suggest File>Save before swapping between JSON editing and code editing, else code edits can get lost. Also check that Min,Max & Default values set in the JSON editor panel have been honoured in the code (lefthand) panel JSON code. I sometimes have to re-enter my desired values in the code panel.

Only very rarely does a ISF shader work in the VIDVOX editor but not in Magic.
https://isf.vidvox.net/desktop-editor/
Magic
Site Admin
Posts: 3695
Joined: Wed Apr 09, 2014 9:28 pm

Re: Issues and pain points when developing ISF shaders in Magic

Post by Magic »

Thanks for your detailed feedback! We really appreciate you taking the time to document all that, and we'll take note of all your points.

We didn't initially intend for Magic to be a development environment for ISF, and as Terry suggested, the official ISF editor is best for that. However, it's very nice to see that you (and many others) are using the ISF functionality in Magic quite extensively. To that end, we're already in the process of releasing a new Magic update (very soon) which is focused on ISF and will have some fixes for your issues, although maybe not all of them. But we'll continue to make improvements.
Post Reply