3

Currently in my render() the background colour is set to white but when I change it to white I cannot see my effect at all.

I was wondering whether there was an option I need to enable or a line of code I might have missed?

public void render(float delta) {
    Gdx.gl.glClearColor(0, 0, 0, 1);
    Gdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT);

    batch.begin();
    effect.update(delta);
    effect.draw(batch);

    batch.end();

}

//here is the .p file

Untitled
- Delay -
active: false
- Duration - 
lowMin: 3000.0
lowMax: 3000.0
- Count - 
min: 0
max: 200
- Emission - 
lowMin: 0.0
lowMax: 0.0
highMin: 250.0
highMax: 250.0
relative: false
scalingCount: 1
scaling0: 1.0
timelineCount: 1
timeline0: 0.0
- Life - 
lowMin: 0.0
lowMax: 0.0
highMin: 500.0
highMax: 1000.0
relative: false
scalingCount: 3
scaling0: 1.0
scaling1: 1.0
scaling2: 0.3
timelineCount: 3
timeline0: 0.0
timeline1: 0.66
timeline2: 1.0
- Life Offset - 
active: false
- X Offset - 
active: false
- Y Offset - 
active: false
- Spawn Shape - 
shape: point
- Spawn Width - 
lowMin: 0.0
lowMax: 0.0
highMin: 0.0
highMax: 0.0
relative: false
scalingCount: 1
scaling0: 1.0
timelineCount: 1
timeline0: 0.0
- Spawn Height - 
lowMin: 0.0
lowMax: 0.0
highMin: 0.0
highMax: 0.0
relative: false
scalingCount: 1
scaling0: 1.0
timelineCount: 1
timeline0: 0.0
- Scale - 
lowMin: 0.0
lowMax: 0.0
highMin: 32.0
highMax: 32.0
relative: false
scalingCount: 1
scaling0: 1.0
timelineCount: 1
timeline0: 0.0
- Velocity - 
active: true
lowMin: 0.0
lowMax: 0.0
highMin: 30.0
highMax: 300.0
relative: false
scalingCount: 1
scaling0: 1.0
timelineCount: 1
timeline0: 0.0
- Angle - 
active: true
lowMin: 90.0
lowMax: 90.0
highMin: 45.0
highMax: 135.0
relative: false
scalingCount: 3
scaling0: 1.0
scaling1: 0.0
scaling2: 0.0
timelineCount: 3
timeline0: 0.0
timeline1: 0.5
timeline2: 1.0
- Rotation - 
active: false
- Wind - 
active: false
- Gravity - 
active: false
- Tint - 
colorsCount: 3
colors0: 1.0
colors1: 0.12156863
colors2: 0.047058824
timelineCount: 1
timeline0: 0.0
- Transparency - 
lowMin: 0.0
lowMax: 0.0
highMin: 1.0
highMax: 1.0
relative: false
scalingCount: 4
scaling0: 0.0
scaling1: 1.0
scaling2: 0.75
scaling3: 0.0
timelineCount: 4
timeline0: 0.0
timeline1: 0.2
timeline2: 0.8
timeline3: 1.0
- Options - 
attached: false
continuous: false
aligned: false
additive: true
behind: false
- Image Path -
particle.png

don't know how to make the .pfile look code like apologies :(

bemeyer
  • 6,154
  • 4
  • 36
  • 86
user3197976
  • 101
  • 6
  • Show the rendering code else we can't help. – bemeyer Jan 15 '14 at 13:03
  • Add it to the question. And please add the effect.p or show us which effect it is, if it's a lot transparent or even white you won't see it. That code is fine for sure. – bemeyer Jan 15 '14 at 13:09
  • so yeh i don't see any option in the .p file that will let me display a particle effect on a white background ? – user3197976 Jan 15 '14 at 13:15
  • also effect is definitely not white it is the default orange and red – user3197976 Jan 15 '14 at 13:18
  • There is nothing like that. If the effect is transparent or the png is transparent that can happen test it with a different particle – bemeyer Jan 15 '14 at 13:18
  • i checked the particle.png (image file) and it is on a transparent background if that is the case then what colour should the background of the particle image be ? – user3197976 Jan 15 '14 at 13:21
  • no that it has a transparent background is fine. Is the effect on a blackscreen white? if so do change the color of it. – bemeyer Jan 15 '14 at 14:04
  • 1
    Tested it. Meight be a bug of libgdx. With a white background no effect is visible even if you change texture color or stuff like that. But well regulary you should have any background so that shouldn't be a problem. Go ask that question inside of the badlogic forum. – bemeyer Jan 15 '14 at 14:38
  • I thought so because I followed their guides religiously. – user3197976 Jan 15 '14 at 14:56

1 Answers1

12

Disable additive blending in your particle effect.