Hello everyone. I can’t manage to make the alpha map to render correctly.
Here is what i have:
In the SpriteSheet, the sprites background is transparent and for tiles the same.
Here is my render code:
g.resetTransform();
g.clearAlphaMap();
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE);
g.setDrawMode(Graphics.MODE_ALPHA_MAP);
Image alphaMap = ImageLoader.getAlphaMap();
alphaMap.drawCentered(Display.getWidth()/2, Display.getHeight()/2);
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
g.setDrawMode(Graphics.MODE_ALPHA_BLEND);
g.translate(xOffset, yOffset);
//RENDERING EVERITHING