jPCT - a 3d engine for Java > Support
Fog Of War Transparency With Software
AGP:
I''m writing a strategy game and can't seem to properly paint a transparent PNG on my fog (so that its edges are rounded). The logic for the texture placement is sound and has been tested. But all I get is solid black.
--- Code: --- if (!TextureManager.getInstance().containsTexture("fog-top")) {
TextureManager.getInstance().addTexture("fog-top", new Texture("Assets"+File.separator+"fog-top.png", true));
TextureManager.getInstance().addTexture("fog-left", new Texture("Assets"+File.separator+"fog-left.png", true));
TextureManager.getInstance().addTexture("fog-right", new Texture("Assets"+File.separator+"fog-right.png", true));
TextureManager.getInstance().addTexture("fog-bottom", new Texture("Assets"+File.separator+"fog-bottom.png", true));
}
--- End code ---
EgonOlsen:
Then most likely your objects aren't rendered with transparency enabled or your textures' alpha channel is off.
AGP:
The textures are right. I set transparency to 0.
EgonOlsen:
Can you upload such a texture for me to see?
AGP:
Yup.
https://www.dropbox.com/s/yzwpl76o8zuzy2e/fog-left.png?dl=0
Navigation
[0] Message Index
[#] Next page
Go to full version