I have made a WebGL port of Minecraft Classic 0.30 Survival Test using TeaVM and I'm having some issues with WebGL texture blending.
Here is the code I'm using:
if(textureName.equals("/terrain.png") || textureName.equals("/arrow.png")) {
GL11.glEnable(GL11.GL_BLEND);
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
}
Here is the result: https://i.stack.imgur.com/SpRg3.png
Do I have to use any GLSL or is there a way I can do it without it?
Edit: Here is the source code if anybody wants to look at it.
I got it working by doing this: