<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Translate shader from ISF to GLSL...]]></title><description><![CDATA[<p>Hi, I am trying to convert ISF shaders into GLSL shaders, so that I can use them in Isadora. <br />I got inspired by DusX and Marks recommendation of the ISF Editor (<a href="https://www.interactiveshaderformat.com/about">https://www.interactiveshaderf...</a>), which offers shaders in GLSL code with an Json header. </p>
<p>To use them in Isadora the Json header needs to be translated back into GLSL-language.</p>
<p>ISF allowes these types of valuables:</p>
<p><img src="https://community.troikatronix.com/assets/uploads/files/1569178286601-screen-shot-2019-09-22-at-16.16.07.png" style="cursor:pointer;max-width:100%;height:auto" /></p>
<p>The GLSL syntax for FLOAT is something like: <br /></p>
<p>// ISADORA_FLOAT_PARAM(gridSize, grid, 1.0, 256.0, 30.0, "Help text");</p>
<p>which defines the parameter to Isadora and </p>
<p>uniform float gridSize;</p>
<p>which defines the variable in GLSL. I found the explanation in the GLSL tutorial from Mark (<a href="https://support.troikatronix.com/support/solutions/articles/13000025645-glsl-shader-actor-tutorial">https://support.troikatronix.c...</a>)</p>
<p>Can anybody with more programming experience than me help me figuring out the syntax for the other ones?</p>
<p>Especially point2D and image (which I figured out, but can not really explain it...)<br /></p>
<p>Best regards, Tom</p>
<p></p>
<p></p>]]></description><link>https://community.troikatronix.com/topic/6129/translate-shader-from-isf-to-glsl</link><generator>RSS for Node</generator><lastBuildDate>Wed, 12 Aug 2026 21:32:23 GMT</lastBuildDate><atom:link href="https://community.troikatronix.com/topic/6129.rss" rel="self" type="application/rss+xml"/><pubDate>Sun, 22 Sep 2019 19:24:22 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Translate shader from ISF to GLSL... on Tue, 24 Sep 2019 22:12:40 GMT]]></title><description><![CDATA[<p><a class="plugin-mentions-user plugin-mentions-a" href="https://community.troikatronix.com/uid/2">@mark</a></p><p></p><p>Wow, thanks a lot, you all!  I am going to look at the code as soon as I get time....</p>]]></description><link>https://community.troikatronix.com/post/37558</link><guid isPermaLink="true">https://community.troikatronix.com/post/37558</guid><dc:creator><![CDATA[tomthebom]]></dc:creator><pubDate>Tue, 24 Sep 2019 22:12:40 GMT</pubDate></item><item><title><![CDATA[Reply to Translate shader from ISF to GLSL... on Tue, 24 Sep 2019 14:24:33 GMT]]></title><description><![CDATA[<p>Dear All,</p>
<p>So I've made progress on the ISF converter this morning. Here's are my first two successes: an ISF plugin called "Bad TV" and one called "Bounce", both converted to the Isadora GLSL format.</p>
<p>Enjoy,<br />Mark</p>
<p><strong>---------- BAD TV GLSL CODE STARTS HERE----------</strong> </p>
<pre>
// ISADORA_FLOAT_PARAM(noiseLevel, PIXD, 0, 1, 0.5, "No help available.")
// ISADORA_FLOAT_PARAM(distortion1, OLTS, 0, 5, 1, "No help available.")
// ISADORA_FLOAT_PARAM(distortion2, *wl3, 0, 5, 5, "No help available.")
// ISADORA_FLOAT_PARAM(speed, rth=, 0, 1, 0.3, "No help available.")
// ISADORA_FLOAT_PARAM(scroll, 2*^j, 0, 1, 0, "No help available.")
// ISADORA_FLOAT_PARAM(scanLineThickness, fhue, 1, 50, 25, "No help available.")
// ISADORA_FLOAT_PARAM(scanLineIntensity, bj%N, 0, 1, 0.5, "No help available.")
// ISADORA_FLOAT_PARAM(scanLineOffset, f*P3, 0, 1, 0, "No help available.")
uniform sampler2D tex0;
uniform float noiseLevel;
uniform float distortion1;
uniform float distortion2;
uniform float speed;
uniform float scroll;
uniform float scanLineThickness;
uniform float scanLineIntensity;
uniform float scanLineOffset;
uniform vec2 resolution;
uniform float time;
// Adapted from http://www.airtightinteractive...
// Also uses adopted Ashima WebGl Noise: https://github.com/ashima/webg...
/*
 * The MIT License
 * 
 * Copyright (c) 2014 Felix Turner
 * 
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), to deal
 * in the Software without restriction, including without limitation the rights
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 * 
 * The above copyright notice and this permission notice shall be included in
 * all copies or substantial portions of the Software.
 * 
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 * THE SOFTWARE.
 * 
*/
// Start Ashima 2D Simplex Noise
const vec4 C = vec4(0.211324865405187,0.366025403784439,-0.577350269189626,0.024390243902439);
vec3 mod289(vec3 x) {
 return x - floor(x * (1.0 / 289.0)) * 289.0;
}
vec2 mod289(vec2 x) {
 return x - floor(x * (1.0 / 289.0)) * 289.0;
}
vec3 permute(vec3 x) {
 return mod289(((x*34.0)+1.0)*x);
}
float snoise(vec2 v) {
 vec2 i  = floor(v + dot(v, C.yy) );
 vec2 x0 = v -   i + dot(i, C.xx);
vec2 i1;
 i1 = (x0.x &gt; x0.y) ? vec2(1.0, 0.0) : vec2(0.0, 1.0);
 vec4 x12 = x0.xyxy + C.xxzz;
 x12.xy -= i1;
i = mod289(i); // Avoid truncation effects in permutation
 vec3 p = permute( permute( i.y + vec3(0.0, i1.y, 1.0 ))+ i.x + vec3(0.0, i1.x, 1.0 ));
vec3 m = max(0.5 - vec3(dot(x0,x0), dot(x12.xy,x12.xy), dot(x12.zw,x12.zw)), 0.0);
 m = m*m ;
 m = m*m ;
vec3 x = 2.0 * fract(p * C.www) - 1.0;
 vec3 h = abs(x) - 0.5;
 vec3 ox = floor(x + 0.5);
 vec3 a0 = x - ox;
m *= 1.79284291400159 - 0.85373472095314 * ( a0*a0 + h*h );
vec3 g;
 g.x  = a0.x  * x0.x  + h.x  * x0.y;
 g.yz = a0.yz * x12.xz + h.yz * x12.yw;
 return 130.0 * dot(m, g);
}
// End Ashima 2D Simplex Noise
const float tau = 6.28318530718;
// use this pattern for scan lines
vec2 pattern(vec2 pt) {
 float s = 0.0;
 float c = 1.0;
 vec2 tex = pt * resolution;
 vec2 point = vec2( c * tex.x - s * tex.y, s * tex.x + c * tex.y ) * (1.0/scanLineThickness);
 float d = point.y;
return vec2(sin(d + scanLineOffset * tau + cos(pt.x * tau)), cos(d + scanLineOffset * tau + sin(pt.y * tau)));
}
float rand(vec2 co){
    return fract(sin(dot(co.xy ,vec2(12.9898,78.233))) * 43758.5453);
}
void main() {
 vec2 p = gl_TexCoord[0].xy;
 float ty = time*speed;
 float yt = p.y - ty;
//smooth distortion
 float offset = snoise(vec2(yt*3.0,0.0))*0.2;
 // boost distortion
 offset = pow( offset*distortion1,3.0)/max(distortion1,0.001);
 //add fine grain distortion
 offset += snoise(vec2(yt*50.0,0.0))*distortion2*0.001;
 //combine distortion on X with roll on Y
 vec2 adjusted = vec2(fract(p.x + offset),fract(p.y-scroll) );
 vec4 result = texture2D(tex0, adjusted);
 vec2 pat = pattern(adjusted);
 vec3 shift = scanLineIntensity * vec3(0.3 * pat.x, 0.59 * pat.y, 0.11) / 2.0;
 result.rgb = (1.0 + scanLineIntensity / 2.0) * result.rgb + shift + (rand(adjusted * time) - 0.5) * noiseLevel;
 gl_FragColor = result;
}</pre>
<p><strong>---------- BAD TV GLSL CODE ENDS HERE----------<br /></strong></p>
<p><strong>---------- BOUNCE GLSL CODE STARTS HERE----------</strong></p>
<pre>
// ISADORA_FLOAT_PARAM(progress, EzYH, 0, 1, 0, "No help available.")<br />// ISADORA_FLOAT_PARAM(bounces, hUY&lt;, 0, 10, 2, "No help available.")<br />// ISADORA_FLOAT_PARAM(shadow_height, tBF6, 0, 1, 0.1, "No help available.")<br />// ISADORA_VEC4_COLOR_PARAM(shadow_colour, 3n%2, 0xFF000000, "No help available.")
uniform sampler2D tex0;<br />uniform sampler2D tex1;<br />uniform float progress;<br />uniform float bounces;<br />uniform float shadow_height;<br />uniform vec4 shadow_colour;
vec4 getFromColor(vec2 inUV) {<br /> return texture2D(tex0, inUV);<br />}<br />vec4 getToColor(vec2 inUV) {<br /> return texture2D(tex1, inUV);<br />}
// Author: Adrian Purser<br />// License: MIT
const float PI = 3.14159265358;
vec4 transition (vec2 uv) {<br />  float time = progress;<br />  float stime = sin(time * PI / 2.);<br />  float phase = time * PI * bounces;<br />  float y = (abs(cos(phase))) * (1.0 - stime);<br />  float d = uv.y - y;<br />  return mix(<br />    mix(<br />      getToColor(uv),<br />      shadow_colour,<br />      step(d, shadow_height) * (1. - mix(<br />        ((d / shadow_height) * shadow_colour.a) + (1.0 - shadow_colour.a),<br />        1.0,<br />        smoothstep(0.95, 1., progress) // fade-out the shadow at the end<br />      ))<br />    ),<br />    getFromColor(vec2(uv.x, uv.y + (1.0 - y))),<br />    step(d, 0.0)<br />  );<br />}
void main() {<br /> gl_FragColor = transition(gl_TexCoord[0].xy.xy);<br />}</pre>
<p><strong>---------- BOUNCE GLSL CODE ENDS HERE----------</strong></p>]]></description><link>https://community.troikatronix.com/post/37537</link><guid isPermaLink="true">https://community.troikatronix.com/post/37537</guid><dc:creator><![CDATA[mark]]></dc:creator><pubDate>Tue, 24 Sep 2019 14:24:33 GMT</pubDate></item><item><title><![CDATA[Reply to Translate shader from ISF to GLSL... on Mon, 23 Sep 2019 12:33:10 GMT]]></title><description><![CDATA[<p>Dear All,</p>
<p>This morning, because of this thread and <a href="https://community.troikatronix.com/topic/5875/solved-freeframe-actors-issues-on-v3/21" target="_blank">another thread that was branching to this topic</a>, I started writing a command line utility to see if I could convert a ISF file to an Isadora GLSL file. Looks promising, but I'm not giving a timeline on this because there are other tasks at the forefront. That said, if I can get it done if a few more hours of work I'll post it here for people to try.</p>
<p>Best Wishes,<br />Mark</p>]]></description><link>https://community.troikatronix.com/post/37505</link><guid isPermaLink="true">https://community.troikatronix.com/post/37505</guid><dc:creator><![CDATA[mark]]></dc:creator><pubDate>Mon, 23 Sep 2019 12:33:10 GMT</pubDate></item><item><title><![CDATA[Reply to Translate shader from ISF to GLSL... on Sun, 22 Sep 2019 20:04:43 GMT]]></title><description><![CDATA[<p>point2D is basically just a point on an 2D matrix, you can't create this type of input in Isadora natively, what we can do is 2 floats called x and y that combined make a point on an 2D matrix.</p><pre>
// ISADORA_FLOAT_PARAM(x, xpoint, 0.0, 100.0, 100.0, "The x coordinate of our point");
// ISADORA_FLOAT_PARAM(y, ypoint, 0.0, 100.0, 100.0, "The y coordinate of our point");
// We need two containers for our float values before we are allowed to parse them to our vec2 function.
uniform float x;
uniform float y;
// Create a new point2D based on our Isadora parameters.
vec2 point = vec2(x, y);</pre>
<p>Image is just the below :</p>
<pre>
uniform sampler2D tex0</pre>]]></description><link>https://community.troikatronix.com/post/37498</link><guid isPermaLink="true">https://community.troikatronix.com/post/37498</guid><dc:creator><![CDATA[Juriaan]]></dc:creator><pubDate>Sun, 22 Sep 2019 20:04:43 GMT</pubDate></item></channel></rss>