Git Product home page Git Product logo

shadermaker's People

Contributors

follower avatar leadedge avatar mahmouze avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

shadermaker's Issues

Resolume 6?

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.

Shader Completely White in Resolume OSX

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.

[Feature Request] Geometry Shaders

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!)

ShaderToy

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!

float2 & float3 not working in OSX

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).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.