Author Topic: Breaking the Shaders  (Read 3364 times)

As a way of practicing GLSL without having to write my own renderer, I was messing around with the shaders the other day.  here are some of the fun things you can do with it:


Here are the normals put into RGB, looks pretty cool.


Here is position put into RGB


I forgot what I did to this one, I think I took the normals and multiplied it by position or something.

And this is just really basic stuff in the fragment shader.  I'm sure you can do a lot more stuff with it, and I want to see what everyone else can come up with.

For example, I made it greyscale!


Here's the function I made for it in the fragment shader.  Don't whine about how bad it is, I realize that there are probably way better ways of doing it.
Code: [Select]
void makeBW(inout vec4 albedo)
{
vec3 red = vec3(albedo.r, albedo.r, albedo.r);
vec3 green = vec3(albedo.g, albedo.g, albedo.g);
vec3 blue = vec3(albedo.b, albedo.b, albedo.b);

albedo.rgb = mix(red, green, blue);
}
« Last Edit: October 04, 2013, 10:51:44 AM by Marcem »

You know what'd be really cool is if there was a way to add another shader option for greyscale or something in an add-on

You know what'd be really cool is if there was a way to add another shader option for greyscale or something in an add-on
that would actually be very easy, you would just have to write something to set the shader name to whatever then compile it and all that.

Oh my god, I'm impressed.

its client sided, right?

The grey colors looked neat.
As for the RGB color shaders, they hurt my eyes they are so bright. Other than that, I like it.
« Last Edit: October 04, 2013, 12:31:34 PM by HanHan13 »

I wish with the shader's option in the menu, there would be a drop down menu with options for custom shaders.

Is that...



Ambience occlusion?!

Is that...



Ambience occlusion?!
Nope, it just looks like it.  That's just where it gets darker because it's close to zero on the z axis.

Is that...



Ambience occlusion?!

That's what I was thinking too, it'd be awesome if someone made shaders with ambient occlusion.

Blocklands version of Post-Processing I assume?

That's what I was thinking too, it'd be awesome if someone made shaders with ambient occlusion.
I was actually trying this, but I couldn't find a good way of doing it.
Blocklands version of Post-Processing I assume?
Yep. It's really nice too.