This class can be used to perform occlusion queries. An occlusion query
can be used to test whether an object is entirely hidden or not.
Change-Id: Ida456df81dbe008a64d3ff4cb7879340785c6abf
Bug #9316260
The GL specification indicates that deleting a bound texture has
the side effect of binding the default texture (name=0). This change
replaces all calls to glDeleteTextures() by Caches::deleteTexture()
to properly keep track of texture bindings.
Change-Id: Ifbc60ef433e0f9776a668dd5bd5f0adbc65a77a0
This is a more elegant way to sample from a float alpha texture.
Instead of sampling from the red channel in the fragment shader
we can set the alpha channel swizzle to redirect it to the
red channel. This lets us sample from the alpha channel in the
fragment shader and get the correct value.
Change-Id: I95bbf7a82964e1bf42c0fee1b782b6bdbbcef618
Float textures offer better precision for dithering.
In addition this change removes two uniforms from gradient shaders.
These uniforms were used to dither gradients but their value is
a build time constant. Instead we hardcode the value directly in
the shader source at compile time.
Change-Id: I05e9fd3eef93771843bbd91b453274452dfaefee
It's faster to compute a dither calculation in the vertex shader and use
a varying (letting the GPU interpolate the fragment values) than to perform
that calculation in the fragment shader as part of a texture lookup.
Issue #7207600 Prime mr1 shader performance issues
Issue #7158326 Bad framerates on MR1 (Mako, Manta, Prime)
Change-Id: I15789582a6e9e2d8b9dd22aa5b0f72f0ba1cce7f