leadedge / shadermaker Goto Github PK
View Code? Open in Web Editor NEWA source code template to create FreeframeGL plugins from GLSL Sandbox and ShaderToy shaders.
License: GNU Lesser General Public License v3.0
A source code template to create FreeframeGL plugins from GLSL Sandbox and ShaderToy shaders.
License: GNU Lesser General Public License v3.0
Has anyone tested this with Resolume 6 yet? I keep getting spammed on forums asking to make my shaders work with Resolume 6. I also get asked to make them 64 bit, but I don't see why that would make a difference.
I made a shader for Resolume that is working well on Windows. When I switch to osx the shader compiles properly but does not display properly in Resolume. The output becomes completely white. Even with the simplest shader I can possibly make
void mainImage( out vec4 fragColor, in vec2 fragCoord )
{
vec3 col = texture2D(iChannel0, fragCoord.xy / iResolution.xy);
fragColor = vec4(col, 1.0);
}
I still only see a purely white screen.
Is it possible to implement the use of Geometry Shaders?
It would be nifty to be able to generate structures from input video frames (e.g. point clouds!)
Hi there,
Very nice project!
I successfully compiled and displayed all the ShaderToy included examples.
But I just can't make any other shader to work from the same website..
For example, here is my code:
float t (iGlobalTime * 0.25 + 10.0)
float hash(float n) { return fract(sin(n) * 1e4); }
float rand(vec2 n) {
return fract(sin(dot(n, vec2(12.9898, 4.1414))) * 43758.5453);
}
const int nbMeta = 30;
vec3 meta[nbMeta];
float map(in vec2 p)
{
float d = 0.0;
for (int i = 0; i<nbMeta; i++)
{
d += meta[i].z / (length(p - meta[i].xy));
}
return d;
}
vec3 normal(in vec2 p)
{
vec2 eps = vec2(0.1, 0.0);
vec3 n;
n.x = map(p) - map(p + eps.xy);
n.y = eps.x * 2.0;
n.z = map(p) - map(p + eps.yx);
n = normalize(n);
return n;
}
vec3 bckground(in vec2 uv)
{
vec3 c = texture(iChannel0, vec2(uv.y / uv.x, t * 0.2 + uv.y * 0.05)).rgb;
return pow(c, vec3(2.2)) + pow(c * 1.3, vec3(10.2));
}
vec3 bckground2(in vec2 uv)
{
vec3 c = texture(iChannel1, vec2(uv.y / uv.x, t * 0.2 + uv.y * 0.05)).rgb;
return pow(c, vec3(2.2)) + pow(c *1.3, vec3(10.2));
}
void mainImage(out vec4 fragColor, in vec2 fragCoord)
{
vec2 q = fragCoord.xy / iResolution.xy;
vec2 uv = fragCoord.xy / iResolution.xy * 2.0 - 1.0;
uv.x *= iResolution.x / iResolution.y;
vec3 col = vec3(0.0);
for (int i = 0; i<nbMeta; i++)
{
meta[i].x = cos(t*hash(float(i)) * 2.0) * hash(float(i) + 0.1) * 2.0;
meta[i].y = sin(t*hash(float(i))) * hash(float(i) + 0.2);
meta[i].z = abs(hash(float(i))) * 5.0 + 0.01;
}
float d = map(uv);
vec3 n = normal(uv);
vec2 p = uv + n.rb;
p = mix(uv, p, clamp(pow(q.x*q.y*(1.0 - q.x) * (1.0 - q.y) * 20.0, 2.5), 0.0, 1.0));
col.r = bckground(p + vec2(0.01, 0.0)).r;
col.g = bckground(p + vec2(0.0, 0.01)).g;
col.b = bckground(p + vec2(0.0, 0.01)).b;
col = pow(col, vec3(1.0 / 2.2));
col = mix(bckground2(uv + vec2(0.0, 0.2)).rgb, col, clamp(pow(q.x*q.y*(1.0 - q.x)*(1.0 - q.y) * 30.0, 2.5), 0.0, 1.0));
//
col *= 0.5 + 0.5 * pow(q.x*q.y * (1.0 - q.x) * (1.0 - q.y) * 50.0, 0.5);
fragColor = vec4(col, 1.0);
}
And this is the original source:
https://www.shadertoy.com/view/MlSXWV
Can you please help me understand what I am doing wrong?
Thanks!
Perhaps this is a non issue, but by switching my float2 and float3 to vec2 and vec3 everything worked fine. On windows however float2 and float3 worked as desired.
I'll check my windows code and see if vec2 and 3 work properly (I was getting some strange debug output which is why I switched from vec to float in the first place).
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.