This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Description: | |
// | |
// A simple test program using the EXT_image_load_store extention (core in OpenGL 4.2 and above) to completely take over the fragment operations, | |
// in the hope of providing a method for accurate emulation of systems offering stencil/depth tests or blending operations that are impossible to | |
// implement using the standard OpenGL equivalents, such as the Sony PSP. This method also has the benefit of being single-pass, so it is pretty | |
// efficient and doesn't require any extra framebuffers. | |
// | |
// The rendering shader renders both to the framebuffer and to a few images (color, depth, stencil) such that it can subsequently use the data | |
// to perform depth/stencil testing and blending. Memory consistency is achieved by a combination of cache qualifiers, per-pixel mutexes and | |
// memory barriers where appropriate. Specifically, glMemoryBarrier(GL_SHADER_IMAGE_ACCESS_BARRIER_BIT) is required between draw calls with |