Problem with CI filters + transparency?

psonice's picture

Also posted to the QC Dev mailing list, apologies if you're reading this twice but I could do with getting this working pretty quick :)

I've found what must be either stupidity on my part, or a pretty bad CI bug. If I set pixels to be transparent in a CI filter, then connect the output to a billboard with 'over' blend mode, it looks like additive blend instead of transparency. Doing the same thing but without the CI filter results in normal transparency.

See the example I've attached - can anyone see anything wrong?

broken CI.qtz108.78 KB

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

psonice's picture
Unbroken CI filters + transparency.

Thanks to a quick fix from Alex, this is now solved. If anyone else has the same issue, just premultiply the returned value:

return premultiply(vec4(sample(image, samplerCoord(image)).rgb,alpha));