[Solved]Selection Circle and Shadow

After the last changes of the pssmShadow the selection circles dont work anymore.

I use a flat box with a transparent circle texture for the selection circles. (and Unshaded.j3md as material)



They should:

-not be affected by shadow (ShadowMode.Off) and light

-should not be rendered in front of the unit



Therefore Bucket.Transparent removes the shadow of the unit at the position of the circle and with Bucket.Translucent the circle is rendered infront of the unit.

could you post a screenshot please?

Here is the screenshot:

ok you have to play with the alpha falloff of the your red circle material.

if it’s in a j3m file use

[java]





MaterialParameters {



}

AdditionalRenderState {

Blend Alpha

AlphaTestFalloff 0.50

}

}

[/java]



if you create it by code

[java]

material.getadditionalRenderState().setAlphaTestFalloff(0.5f);

[/java]



could you test that please?

Nope, doesnt change anything.

(I know that the unshaded material doesnt have this parameter so I replaced it with Lighnting.j3md but there is no difference)

It’s a RenderState not a Parameter, every material has it.

are you sure you placed it in the additionalRenderState section?

ha, we need:

[java]mat.getAdditionalRenderState().setAlphaFallOff(0.9f);

mat.getAdditionalRenderState().setAlphaTest(true);[/java]

yeah i forgot about the alphaTest flag sorry.

that cool it works