GLSL Mixer (Composition by gtoledo3)

Author: gtoledo3
License: Public Domain
Date: 2011.09.30
Compatibility: 10.4, 10.5, 10.6, 10.7
Categories:
Required plugins:
(none)

This is a shader example that shows how to interpolate two textures using GLSL. It's handy as a destination that one can write to and mix directly at the renderer. It's also handy because one can get in there and edit in color control for each texture, change the way the texture maps, etc., if they desire.

It's based on part of the code here: http://www.codeproject.com/KB/openGL/GLSLShader.aspx ... but, it's also totally basic functionality, and I'm pretty sure this is described on the OpenGL org docs (as well as a few different types of mix/interpolate type functions that this could be adapted to do).

cybero's picture
Re: GLSL Mixer (Composition by gtoledo3)

Good tutorial link and a really nicely put together example. Thanks for sharing :-) Works nicely with RIIs and movies.

vade's picture
Re: GLSL Mixer (Composition by gtoledo3)

mix(source, dest, amount) ?

gtoledo3's picture
Re: GLSL Mixer (Composition by gtoledo3)

Sure, that will work as well. I liked that this illustrated what the mix function is actually doing.

PreviewAttachmentSize
mixer_built_in_func.qtz247.08 KB