Slick Forums

[Lighting] AlphaMap conflicts with the player sprite
Page 1 of 1

Author:  Xolitude [ Thu Aug 10, 2017 7:27 pm ]
Post subject:  [Lighting] AlphaMap conflicts with the player sprite

Hey everyone! I'm having an issue with the "fake lighting" using an alpha map and the player sprite's alpha. I've read that these two conflict but have found no concrete answer on why or how to go about solving the issue. Here is a screenshot of the problem:

And below is the code I am using to render these two:
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE);
this.gradient.drawCentered(100, 100);

map.render(gc, sbg, g);
map.renderEntities(gc, sbg, g);
// render UI's.

Is there a way to blend them together or something? Sorry, I'm a bit new at producing light for games as this is my first game and my first attempt at lighting; any help would be greatly appreciated!

Page 1 of 1 All times are UTC
Powered by phpBB® Forum Software © phpBB Group