All Questions
23
questions
0
votes
1
answer
89
views
Masking using Blending Function does not work on Android
The code is made according to the example from the official LibGDX WIKI:
https://libgdx.com/wiki/graphics/2d/masking#4-masking-using-blending-function-shapes-or-textures
Works on DESKTOP
Does not work ...
0
votes
1
answer
95
views
Draw texture to FrameBufferObject using specific color
I have a texture and I want to draw it to a FrameBufferObject. The texture has transparent areas. I would like the following:
For all transparent pixels, let them be drawn transparent in the ...
1
vote
1
answer
155
views
LIBGdx - I get gray pixels in a sprite when saving as PNG
I've been trying to scale down a sprite and save it to the android local store for later use, but everything I've tried always results in a grey edge around the sprite.
Sprites
As you can see, the ...
8
votes
2
answers
860
views
Gradient color text
What I actually try to achieve:
I'd like to draw text with a gradient vertical color. I found this solution, but it doesn't quite fit for me, as it has black square around the gradient font in my case ...
2
votes
1
answer
140
views
What blending mode do I need to make images more transparent by drawing transparent images over them?
This picture explains what I am aiming for:
Basically, I have a framebuffer and I want to make the contents of it more transparent by drawing a fullscreen shape over it. The color of this shape will ...
0
votes
1
answer
541
views
Create "Union" of two masking images in OpenGL
for a current 2D project I am rendering different objects on a scene.
On top of this I render images which have a cut out part, for example a transparent circle on a black image. When moving the cut-...
0
votes
1
answer
445
views
Draw a frame with textures in libgdx
I am trying to draw a frame with two textures within Libgdx. My texture is just a white square that i scale and draw with SpriteBatch to the screen. The color is set with batch.setColor(). Now I want ...
0
votes
1
answer
718
views
Ambient light is getting brighter when a light is added (OpenGL, Normal mapping)
In the last few days I played around with lightning in Java (Libgdx). I'm new to OpenGL or Shaders and I've stumbled across a nice Tutorial how to implement lighting with normal mapping (https://...
1
vote
0
answers
553
views
Libgdx Fog of War (Texture blending), Framebuffer bug
i try to get a simple fog of war for my strategy game.
I fail at the moment on framebuffer drawing.
Im an absolute openGL beginner.
New Problem 1;
Contructor:
int width = Gdx.graphics.getWidth(...
0
votes
1
answer
1k
views
Libgdx: Framebuffer for "Fog of War"-Effect
I am writing a RTS Game for Android and I want the "Fog of War" effect on the player's units. This effect means that only a "circle" around each unit shows the background map while on places where no ...
2
votes
2
answers
2k
views
LibGDX Overlapping 2D Shadows
I'm working on shadows for a 2D overhead game. Right now, the shadows are just sprites with the color (0,0,0,0.1) drawn on a layer above the tiles.
The problem: When many entities or trees get ...
9
votes
3
answers
2k
views
Alpha gradients not smooth in WebGL when using premultiplied alpha
I've got a LibGDX game with cartoon clouds with a smooth gradient. There are other examples of gradients in the game that have a similar issue, but the clouds are the most obvious example. They look ...
0
votes
1
answer
2k
views
How to blend two texture colors in Libgdx
I'm trying to blend two circles, one black and the other white. The parts where they intersect must be in grey.
I tried to use blend functions but I don't get the expected results.
The objective is ...
1
vote
1
answer
629
views
OpenGL (libgdx) - blending alpha map
I am trying to blend a white texture with varying alpha values with a colored background. I am expecting the result to retain colors from the background, and have alpha values replaced by ones from ...
2
votes
1
answer
779
views
Libgdx - Colouring only part of a sprite dynamically
Have an Android application running Libgdx with many sprites all floating around. Currently I colour them all differently depending on which group they belong to, eg "red", "green", "blue" etc. ...