Hi folks @davidlublin @ProjectileObjects I need to know more regarding rendering pipeline of ISF shaders in VDMX. Basically i need to know rules of dos and donts. I have came across few instances when shaders render fine in OpenGL4 mode in ISF editor but produce black screen in VDMx
Are the shaders converted to Metal via Vulkan’s SPIRV or are they are rendered via OpenGL. Would be awesome to get full document on this
Much obliged
Excellent question.
They are converted to run on metal.
This is the process:
https://github.com/mrRay/ISFMSLKit
1 Like
This is good!
Let me ask you another question
This is from readme ISFMSLKit
ISFMSLKit is a Mac framework for working with ISFfiles (and the GLSL source code they contain) in a tech stack that uses Metal to render content. At runtime, it transpiles GLSL to MSL, caches the compiled binaries to disk for rapid access, and uses Metal to render content to textures.
Does this create a binary or metal sourcecode?
Can there be an export to metal source? Dreamcase, i take out shader that is troublesome and run it in KodeLife
Here’s what David said:
- Send us any shaders that don’t work / convert properly! If it’s a bug on our end, we want to fix it, and it’s easier to figure out what’s wrong with the actual shader.
- ISFMSLKit itself can produce the Metal shader code if someone wants it, but VDMX only writes the precompiled binary files to disk.
- Error logs for any ISFs that fail to compile or transpile show up in ~/Library/Application Support/VDMX/ISF
- In some cases ISF that work in OpenGL 4 but fail to transpile to Metal are due to a variable name; eg if the GLSL code contains a variable name that is allowed under OpenGL may be a reserved name under Metal. If this is the case, it’ll show up in the error logs.
And from here: Some techniques for drawing text in GLSL — VDMX - MAC VJ SOFTWARE
"Jon Baker uses a similar approach for adapting the Code page 437 font to use a single fragment shader. The blog post diving into how it was developed includes example code shared on ShaderToy . Converting this to ISF is a fun exercise. The big detail is that when using this in VDMX6, the ‘char’ variable is a restricted name by Metal, so we have to change that to something else."