GLSL - Vertex Distortion Examples - Textured, Colored, Lighting

gtoledo3's picture

I came up with these shaders tonight while looking at the classic "vertex noise" glsl example, and thought I would share.

There are three variants; one is a textured vertex noise shader, one is a textured vertex noise shader with color control, and the third is a textured vertex noise shader with color control and lighting.

These shaders should work well with objects that are 3D dimensional as well (the wave shader I posted a couple of days ago calculated z in a way that flattens an object out).

gtoledo3's picture
Re: GLSL - Vertex Distortion Examples - Textured, Colored, ...

This is a version that changes alpha in the shader so that you can put something like a particle generator inside, add a texture, and then have every particle textured with whatever the texture input is, and also have color control.

It adds a fun sort of action to the particle system to have it in a vertex shader like this... this is a technique I've used a crapload out of (shading particles and other things that aren't usually shaded in QC), but hadn't taken the extra step to build texturing into the shader and get the alpha method right.

edit- These are two different qtz's that calculate color differently (an update to the orig post included). No alpha blend plugin necessary for the particles...