My requirement is to render per pixel data (say pixel transparency) to some buffer (say render pass 1) and then render a shape using the per pixel lighting rendered in shape 1. I can use depth buffer Or an additional color attachment in the frame buffer for render pass 1. Which one of the two should be preferred for this purpose for better performance?

  • \$\begingroup\$ Anytime you want to know "is option A or option B faster?" the very best way to know for sure is to try option A and option B on a simple sample and measure your results. That way there's absolutely no hearsay or speculation involved: you know exactly how each option compares, in exactly your use case, on exactly your target hardware. \$\endgroup\$ – DMGregory Jul 5 '18 at 16:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.