Question

Is there equivalent functionality to Directx's texturing blending? http://msdn.microsoft.com/en-us/library/windows/desktop/bb206241(v=vs.85).aspx

It basically blends several textures together before applying it onto the mesh.

Was it helpful?

Solution

From scanning through that page, I believe you can do all of that in a fragment shader. You can bind multiple textures, sample them all in your shader, and combine the results at your hearts desire.

It looks similar to functionality that OpenGL used to have in the fixed function pipeline. My old version of the red book (OpenGL Programming Guide) has chapters on "Multitexturing" and "Texture Combiner Functions". This is still available if you use the compatibility profile. But IMHO, this is a great example of where squeezing certain kinds of functionality into the fixed pipeline looked very cumbersome, while doing the same thing in shaders is much easier and more flexible.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top