rift render canidate

This commit is contained in:
StevenRS11 2014-08-20 21:44:16 -05:00
parent 0dd1f1b293
commit a55fdbfd0f

View file

@ -94,15 +94,12 @@ public class RenderRift extends TileEntitySpecialRenderer
// determines which jitter waveform we select. Modulo so the same point
// gets the same jitter waveform over multiple frames
int jIndex = 0;
// set the color for the render
GL11.glColor4f(.1F, .1F, .1F, 1F);
GL11.glColor4f(.02F, .02F, .02F, 1F);
/**best ones so far
* glBlendFunc(GL_SRC_COLOR, GL_ONE);
* glBlendFunc(GL_SRC_COLOR, GL_ONE);
*/
glBlendFunc(GL_ONE_MINUS_SRC_COLOR, GL_ONE);
//set the blending mode
GL11.glEnable(GL_BLEND);
glBlendFunc(GL_ONE_MINUS_SRC_COLOR, GL_ONE);
GL11.glBegin(GL11.GL_TRIANGLES);
for (Point p : poly.points)
{
@ -117,6 +114,7 @@ public class RenderRift extends TileEntitySpecialRenderer
.cos(Math.toRadians(riftRotation)));
// apply scaling
x *= scale;
y *= scale;
@ -135,13 +133,7 @@ public class RenderRift extends TileEntitySpecialRenderer
GL11.glEnd();
/**best one so far
* glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_DST_COLOR);
* glBlendFunc(GL_ONE_MINUS_DST_COLOR, GL_ZERO );
*/
GL11.glColor4f(.3F, .3F, .3F, .2F);
glBlendFunc(GL_ONE_MINUS_DST_COLOR, GL_ZERO );
glBlendFunc(GL_ONE, GL_ONE_MINUS_DST_COLOR);
@ -164,6 +156,10 @@ public class RenderRift extends TileEntitySpecialRenderer
y += .5;
z += .5;
if (jIndex % 3 == 0)
{
GL11.glColor4d(jitters[(jIndex + 5) % jCount] / 11, jitters[(jIndex + 4) % jCount] / 8, jitters[(jIndex+3) % jCount] / 8, 1);
}
GL11.glVertex3d(xWorld + x, yWorld + y, zWorld + z);
}