LensFlare hidding behind object

Started by ggp, February 26, 2014, 12:44:28 PM

Previous topic - Next topic

ggp

The LensFlare hidding behind object
worked before, not now
why?

used jpct-ae 1.28


                        LensF=new LensFlare(sun.getPosition(), "burst", "halo1", "halo2", "halo3");
LensF.setHiding(true);
LensF.setMaximumDistance(-1f); // i have also tried that in case of distance pb ...
LensF.setTransparency(2);
LensF.setGlobalScale(1.0f);

EgonOlsen

The code for the lens flares hasn't changed in ages. Maybe some fix to the ray casting methods causes this in your case. It would help to know, what 'before' actually means in this context (which version...).
Also make sure that all objects that are supposed to hide the lenses are defined as colliders.

ggp

jpct-ae 1.24 no work
jpct-ae 1.28 no work

without collision  and with collision

i don't know ???

this is my config

public MyRenderer() {
Config.maxPolysVisible = 500;
         Config.farPlane = 1500;
         Config.glTransparencyMul = 0.1f;
         Config.glTransparencyOffset = 0.1f;
         Config.useVBO=true;
         
         Texture.defaultToMipmapping(false);
         Texture.defaultTo4bpp(true);
}


There is some code example that works?

EgonOlsen

....soooo there is no working version of this?

ggp


EgonOlsen

I don't get it...in the post above, you state that 1.24 doesn't work either but in the last post, you state that it does?!?

ggp

a long time ago work in 1.24,

but now no work in jpct-ae 1.24



                                        fb.clear(back);

LensF.render(fb);
LensF.update(fb, world);

world.renderScene(fb);
world.draw(fb);

fb.display();



sorry, my English is not very good

ggp

SOLVED!! :D
i dont undestand,
before work the other way

Here was the error


                                        world.renderScene(fb);
world.draw(fb);
LensF.render(fb);
LensF.update(fb, world);
fb.display();

EgonOlsen

The lens flare relies on blitting images onto the screen. If you place it before the actual scene rendering, it will be overriden by the scene itself. I don't see, how this could have worked in the past. Anyway, if it's solved now, all is fine... :)

ggp

Maybe i forget change comments lines of LensFlares

i think other question

fixed background

for day sun, blue sky(texture gradient)

                                       world.renderScene(fb);
                                       fb.blit(this.background, 0, 0, 0, 0, 512, 256, width, height, -1, false);
world.draw(fb);
LensF.render(fb);
LensF.update(fb, world);
fb.display();


EgonOlsen


ggp

put fixed background is the question

simple image backdrop screen

EgonOlsen

Just like what you already did. I would move the blit before the renderScene, but that shouldn't matter.

ggp

in motorola moto g work fine

in htc wildfire s crash app

why?

EgonOlsen

What does 'crash app' mean? Nobody can find a problem with such a vague description. Do you have an exception and/or some log output? I don't any reason why a simple blit should crash an app.