Class CameraGroupStrategy

java.lang.Object
gaiasky.util.gdx.g3d.decals.CameraGroupStrategy
All Implemented Interfaces:
com.badlogic.gdx.graphics.g3d.decals.GroupStrategy, com.badlogic.gdx.utils.Disposable

public class CameraGroupStrategy extends Object implements com.badlogic.gdx.graphics.g3d.decals.GroupStrategy, com.badlogic.gdx.utils.Disposable

Minimalistic grouping strategy that splits decals into opaque and transparent ones enabling and disabling blending as needed. Opaque decals are rendered first (decal color is ignored in opacity check).
Use this strategy only if the vast majority of your decals are opaque and the few transparent ones are unlikely to overlap.

Can produce invisible artifacts when transparent decals overlap each other.

Needs to be explicitly disposed as it might allocate a ShaderProgram when GLSL 2.0 is used.

States (* = any, EV = entry value - same as value before flush):

expects exits on
glDepthMask true EV
GL_DEPTH_TEST enabled EV
glDepthFunc GL_LESS | GL_LEQUAL EV
GL_BLEND disabled EV | disabled
glBlendFunc * *
GL_TEXTURE_2D * disabled
Camera strategy table.