Some minor graphical work.

This commit is contained in:
Lizbeth Rika committed 2014-10-31 18:19:53 +00:00
1 parent c82caadd85
commit 780188c17e
2 files changed
+7 -5

No files matched your search

@@ -60,9 +60,10 @@ public class ModelSpinningCubes extends ModelBase {
GL11.glRotatef(deg, xRotate, yRotate, zRotate);
if(repeat < origRepeat) {
GL11.glColor4f(1F, 1F, 1F, 0.2F);
GL11.glColor4f(1F, 1F, 1F, ((float) repeat / (float) origRepeat) * 0.4F);
GL11.glEnable(GL11.GL_BLEND);
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
GL11.glDisable(GL11.GL_ALPHA_TEST);
} else GL11.glColor4f(1F, 1F, 1F, 1F);
int light = 15728880;
@@ -72,15 +73,16 @@ public class ModelSpinningCubes extends ModelBase {
OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, lightmapX, lightmapY);
spinningCube.render(1F / 16F);
if(repeat < origRepeat)
if(repeat < origRepeat) {
GL11.glDisable(GL11.GL_BLEND);
GL11.glEnable(GL11.GL_ALPHA_TEST);
}
GL11.glPopMatrix();
}
GL11.glPopMatrix();
GL11.glEnable(GL11.GL_TEXTURE_2D);
if(repeat != 0)
renderSpinningCubes(cubes, repeat - 1, origRepeat);
}
@@ -31,7 +31,7 @@ void main() {
g = min(1, g + s);
b = min(1, b + s);
if(hpFract <= 0.5) {
if(hpFract <= 0.2) {
float flash = (sin(time * 2.0) - 0.8) * 5;
if(flash > 0) {
g = max(0, g - flash);