Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private void renderLightRuneFx(Vec3Int coord) {
- glPushMatrix();
- EntityClientPlayerMP player = Minecraft.getMinecraft().thePlayer;
- double offsetX = coord.x - (player.lastTickPosX + (player.posX - player.lastTickPosX) * partialTicks) + 0.5;
- double offsetY = coord.y - (player.lastTickPosY + (player.posY - player.lastTickPosY) * partialTicks) + 5.5;
- double offsetZ = coord.z - (player.lastTickPosZ + (player.posZ - player.lastTickPosZ) * partialTicks) + 0.5;
- int renderDistBlocks = FMLClientHandler.instance().getClient().gameSettings.renderDistanceChunks * 16;
- if ((offsetX*offsetX + offsetZ*offsetZ) > (renderDistBlocks*renderDistBlocks)) return;
- glTranslated(offsetX, offsetY, offsetZ);
- glColor4f(0.8f, 0.8f, 1f, 0.9f);
- glRotatef(renderTick, 0, 1, 0);
- glDisable(GL_TEXTURE_2D);
- glEnable(GL_BLEND);
- glBlendFunc(GL_ONE, GL_ONE_MINUS_SRC_ALPHA);
- // Blur X and render to framebuffer A
- glUseProgram(GAUSSIAN_BLUR);
- int location = glGetUniformLocation(GAUSSIAN_BLUR, "direction");
- glUniform3f(location, 1f, 0f, 0f);
- sphere.draw(2, 24, 24);
- glEnable(GL_TEXTURE_2D);
- glDisable(GL_BLEND);
- glUseProgram(0);
- glPopMatrix();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement