width = w;
height = h;
hdr = false;
+ alpha = false;
samples = 0;
target_ms = 0;
target[0] = 0;
}
}
+void Pipeline::set_alpha(bool a)
+{
+ if(a==alpha)
+ return;
+
+ bool old_alpha = alpha;
+ alpha = a;
+ try
+ {
+ create_targets(2);
+ }
+ catch(...)
+ {
+ alpha = old_alpha;
+ throw;
+ }
+}
+
void Pipeline::set_multisample(unsigned s)
{
if(s==samples)
target_ms = 0;
}
- PixelFormat color_pf = (hdr ? RGB16F : RGB);
+ PixelFormat color_pf = (hdr ? (alpha ? RGBA16F : RGB16F) : (alpha ? RGBA : RGB));
RenderTargetFormat fmt = (RENDER_COLOR,color_pf, RENDER_DEPTH);
if(!postproc.empty() || samples)
{