Back to Esenthel after a coding workshop, and things are going great! I am creating some game objects, of which one is a particle that also emits light. Shown in the attached image.
However, the edges are quite "hard". Is there a way to soften the edges of a LightPoint? LightPoint takes a Vec(3) as parameter, excluding a possible alpha?
Are you sure the hard edges are because of the light and not a particle?
Because I don't have a problem like this with LightPoint.
I'll do some tests though.
If you are sure, can you please provide a reproducible test-case (a sample project so I can test it, or you can modify some tutorials from the engine to reproduce the problem).
Yes the lights take a Vec param without alpha, because alpha is useless for lights.
If you want to fade a light, you can just multiply the Vec color by a Flt alpha.
Since it's in linear gamma, then better use Sqr(alpha), example:
Vec lin_col=Vec(1,1,1)*Sqr(alpha);
Also, what's your 'colorl' value? is it around in range 0..1? Or much bigger? like 100 or something?
Are you sure the hard edges are because of the light and not a particle?
Because I don't have a problem like this with LightPoint.
I'll do some tests though.
If you are sure, can you please provide a reproducible test-case (a sample project so I can test it, or you can modify some tutorials from the engine to reproduce the problem).
Yes the lights take a Vec param without alpha, because alpha is useless for lights.
If you want to fade a light, you can just multiply the Vec color by a Flt alpha.
Since it's in linear gamma, then better use Sqr(alpha), example:
Vec lin_col=Vec(1,1,1)*Sqr(alpha);
Also, what's your 'colorl' value? is it around in range 0..1? Or much bigger? like 100 or something?
Hi Esenthel,
Thank you for the fast response!
colorl is defined as "colorl = obj.getParam("LightColor").asColor().v3;"
In the case at hand, it's Vec(0.251, 0.0, 0.0). Although now with the multiplication of Sqr(0.5f), the edges have greatly improved!