Render Buffer targets in MATs

I’ve been getting into using multiple render buffers some, especially for rendering specular to a different buffer so I can bloom it and composite back on top of the rest of the lighting for that spiffy glow look you see in video games.

I thought it would be nice if there was a built in way to send different lighting types (specular, emit, diffuse, rim, etc) to a color buffer of your choosing within the phong MAT. Of course this can be done with relative ease after you’ve exported a shader from the phong MAT, but it seems like a solid enough technique to warrant being an option in the MAT operator.

This continues the discussion about beefing up the “render engine” abilities of TD to more easily get high quality game style renders. I’m sure there are other techniques (reflection, volume lights, etc) that could also be thought about as well. What other things could be turned into Operator options or new materials?

How would like to see the control laid out? Just a dropdown menu per color buffer with options like ‘Full Color’, ‘Specular Light Contribution’, ‘Color Map’ etc.

I had in mind the ability to choose the color buffer per lighting type. So like a drop down under any type of color contributing source for which buffer (is there a max? should it just be an integer value?) it should go to. I guess the default opperand would just be addition of any source on each buffer.

So something like diffusebuffer = 0, emitbuffer = 1, specbuffer = 2, constantbuffer = 0, rim1buffer = 1, rim2buffer = 1, darkemitbuffer = 3, spec2buffer = 1

I suppose you may even want to eventually add the option under the multi-texturing as well? maybe that’s too much, since it all goes to diffuse/constant anyhow.

I suppose there are a number of ways to go about it, but I don’t think it needs to go incredibly deep since we can still just export the shader to get more involved, but at least for the stock, non-multi-textured lighting types it could be super nice!

Thoughts?