Page 7 of 7
Re: FreeframeGL ShaderLoader
Posted: Fri Apr 28, 2017 03:18
by leadedge
Re: FreeframeGL ShaderLoader
Posted: Sun Apr 08, 2018 14:24
by vjcrux
After having read all the forum i still have some basic question about loading shaders on osx after quartz's death:
Is it available a ffgl plugin (shaderloader?) that can load .fs or .txt directly on osx resolume?
Has someone compiled it and shared?
VDMX can now easily play .fs files easily draggin in. Will resolume do the same?
Is it possible compile an .bundle generators or filters plugin ?
If yes, please can someone kindly tell me where and how?
Grateful for a clear answer, thank
Re: FreeframeGL ShaderLoader
Posted: Thu May 10, 2018 14:51
by rdpozo
Is there anyone that could use ShaderMaker to compile this effect for me?
I have tried doing it but it always fail, and my skills in programming is not that great.
I really would appreciate the help and could pay a little for the effort. Thanks for the help
<jittershader name="slide">
<param name="slide_up" type="float" default="1" />
<param name="slide_down" type="float" default="1" />
<param name="tex0" type="int" default="0" />
<param name="tex1" type="int" default="1" />
<language name="glsl" version="1.0">
<bind param="tex0" program="fp" />
<bind param="tex1" program="fp" />
<bind param="slide_up" program="fp" />
<bind param="slide_down" program="fp" />
<program name="vp" type="vertex">
<![CDATA[
// define our varying texture coordinates
varying vec2 texcoord0;
varying vec2 texcoord1;
void main(void)
{
// the output vertex postion to the input vertex position
// transformed by the current ModelViewProjection matrix
gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;
// assign our varying texture coordinates to the
// input texture coordinate values transformed
// by the appropriate texture matrix. This is
// necessary for rectangular and flipped textures
texcoord0 = vec2(gl_TextureMatrix[0] * gl_MultiTexCoord0);
texcoord1 = vec2(gl_TextureMatrix[1] * gl_MultiTexCoord1);
}
]]>
</program>
<program name="fp" type="fragment">
<![CDATA[
uniform float slide_up;
uniform float slide_down;
varying vec2 texcoord0;
varying vec2 texcoord1;
uniform sampler2DRect tex0;
uniform sampler2DRect tex1;
void main(void)
{
vec4 su, sd, up, down, amount;
// sample inputs at texcoords
vec4 input0 = texture2DRect(tex0, texcoord0);
vec4 input1 = texture2DRect(tex1, texcoord1);
// get contribution
amount.x = input0.x > input1.x ? 1.0 : 0.0;
amount.y = input0.y > input1.y ? 1.0 : 0.0;
amount.z = input0.z > input1.z ? 1.0 : 0.0;
amount.w = input0.w > input1.w ? 1.0 : 0.0;
// calculate slide down
float d = max(1.0, abs(slide_down));
sd = vec4(1.0 / d);
down = input1 + ((input0 - input1) * sd);
// calculate slide up
float u = max(1.0, abs(slide_up));
su = vec4(1.0 / u);
up = input1 + ((input0 - input1) * su);
// mix between down and up
gl_FragColor = mix(down, up, amount);
}
]]>
</program>
</language>
</jittershader>