http://devmaster.net/posts/3100/shader-effects-glow-bloom. Using this to create my own custom glow pipeline.
Found this function below which I think will let me efficiently render glow maps. Couple questions.
static function SetRenderTarget (colorBuffers : RenderBuffer[], depthBuffer : RenderBuffer) : void
-
What shader models are supported by this? I assume GL ES 2.0 doesn’t but just curious. If all that’s pretty cool.
-
How on earth do I output this from my shader?
struct PSoutput
{
float4 main : Color0;
float4 emissive : Color1;
float depth :smile:EPTH;
};
PSoutput frag(fragmentInput v2f)
{
PSoutput o;
//initialize color0 and color1 but depth should do itself
return o;
}
is my guess but that doesn’t seem right.
-
Do I need to set the depth buffer value or will that automatically be grabbed? if I need to set it what value is it? just position.z in screenSpace?
-
Will other shaders default to using colorbuffer0 automatically or would I have to rewrite the whole shader library >.<.
Just want more information before I tread to far forward into this murky territory.