Advertisement
Guest User

Untitled

a guest
Jul 24th, 2015
253
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. private void renderLightRuneFx(Vec3Int coord) {
  2.         glPushMatrix();
  3.  
  4.         double offsetX = coord.x - (player.lastTickPosX + (player.posX - player.lastTickPosX) * partialTicks) + 0.5;
  5.         double offsetY = coord.y - (player.lastTickPosY + (player.posY - player.lastTickPosY) * partialTicks) + 5.5;
  6.         double offsetZ = coord.z - (player.lastTickPosZ + (player.posZ - player.lastTickPosZ) * partialTicks) + 0.5;
  7.  
  8.         int renderDistBlocks = FMLClientHandler.instance().getClient().gameSettings.renderDistanceChunks * 16;
  9.         if ((offsetX*offsetX + offsetZ*offsetZ) > (renderDistBlocks*renderDistBlocks)) return;
  10.  
  11.         glTranslated(offsetX, offsetY, offsetZ);
  12.         glColor4f(0.8f, 0.8f, 1f, 0.9f);
  13.         glRotatef(renderTick, 0, 1, 0);
  14.         glDisable(GL_TEXTURE_2D);
  15.  
  16.         glEnable(GL_BLEND);
  17.         glBlendFunc(GL_ONE, GL_ONE_MINUS_SRC_ALPHA);
  18.  
  19.         glUseProgram(GAUSSIAN_BLUR);
  20.     int location = glGetUniformLocation(GAUSSIAN_BLUR, "direction");
  21.         glUniform3f(location, 1f, 0f, 0f);
  22.         sphere.draw(2, 24, 24);
  23.  
  24.         glEnable(GL_TEXTURE_2D);
  25.         glDisable(GL_BLEND);
  26.         glUseProgram(0);
  27.         glPopMatrix();
  28.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement