Posted January 27, 201411 yr Hi all, I just want to apply a light level to 1 meta of a block so have used: public int getLightValue(IBlockAccess world, int x, int y, int z) { this.setLightValue(world.getBlockMetadata(x, y, z) == 4 ? 1 : 0); return lightValue[blockID]; } this works fine, however my texture has gone bright and really transparent, the block in question is a custom model and does have a slightly transparent texture (90&) the renderer is using GL11.glEnable(GL11.GL_BLEND); and GL11.glDisable(GL11.GL_BLEND); Im also calling adjustLightFixture in the renderer but not sure if I need to add something here to take into account the light level added.
January 28, 201411 yr Author Weird but ive removed that code and my models are still getting a bright VERY transparent version of my texture. They werent before.... ok so it seems that the GL blend and light values do not mix, does anyone know a solution to this issue?
January 28, 201411 yr Light values shouldn't make your texture bright, it must be something wrong with the texture. Try re-creating the texture.
January 28, 201411 yr Author Tried with a completely plain flat old texture does the same thing. If I add the GL11.glEnable(GL11.GL_BLEND); I get the nice transparency of my texture but the moment I set a light level it makes the texture go nuts, I cant seem to have both together, examples: Heres my model with texture with just the light level set, no blend IN GL11 Heres my model with texture with the light level disabled and GL11 blnd turned on Hers my model with both turned on
January 28, 201411 yr You enabled GL_BLEND but you didn't set up a blend function. Add GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA); just after the GL_BLEND Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable. If you think this is the case, JUST REPORT ME. Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice. Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked. DO NOT PM ME WITH PROBLEMS. No help will be given.
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.