use of gaiasky.render.IQuadRenderable in project gaiasky by langurmonkey.
the class BillboardSpriteRenderSystem method renderStud.
@Override
public void renderStud(Array<IRenderable> renderables, ICamera camera, double t) {
if ((ctIndex < 0 || alphas[ctIndex] != 0)) {
renderables.sort(comp);
ExtShaderProgram shaderProgram = getShaderProgram();
shaderProgram.begin();
// Global uniforms
shaderProgram.setUniformMatrix("u_projView", camera.getCamera().combined);
shaderProgram.setUniformf("u_time", (float) t);
// Rel, grav, z-buffer
addEffectsUniforms(shaderProgram, camera);
// Render each sprite
renderables.forEach(r -> {
IQuadRenderable s = (IQuadRenderable) r;
s.render(shaderProgram, getAlpha(s), mesh, camera);
});
shaderProgram.end();
}
}
use of gaiasky.render.IQuadRenderable in project gaiasky by langurmonkey.
the class BillboardStarRenderSystem method renderStud.
@Override
public void renderStud(Array<IRenderable> renderables, ICamera camera, double t) {
if ((ctIndex < 0 || alphas[ctIndex] != 0)) {
renderables.sort(comp);
ExtShaderProgram shaderProgram = getShaderProgram();
shaderProgram.begin();
if (texture0 != null) {
texture0.bind(0);
shaderProgram.setUniformi("u_texture0", 0);
}
// General uniforms
shaderProgram.setUniformMatrix("u_projView", camera.getCamera().combined);
// Rel, grav, z-buffer
addEffectsUniforms(shaderProgram, camera);
// Global uniforms
shaderProgram.setUniformf("u_time", (float) t);
renderables.forEach(r -> {
IQuadRenderable s = (IQuadRenderable) r;
s.render(shaderProgram, getAlpha(s), mesh, camera);
});
shaderProgram.end();
}
}
Aggregations