pixijs / lights

Adds dynamic lighting via deferred shading to PixiJS
https://pixijs.io/lights/docs/index.html
MIT License
205 stars 29 forks source link

Outline radius too sharpen, a way for blur ? #21

Open jonlepage opened 6 years ago

jonlepage commented 6 years ago

hi, Is there a way to get more smoother radius? Like a kind of blur filter ? I find the outline of the radius a little too sharpen. lightradius

i also try to add a blur filter but not work, the light disappear. Can be add a property called lens for soften the outline of the ray? Is there currently a way to do it? thank

ivanpopelyshev commented 6 years ago

That shader has function depends on radius in it. I'm sure you can modify it that way it'll be blurred

jonlepage commented 6 years ago

I confess you I have spend a lot of time trying different combinations, but I'm not able to get the desired FX. I am maybe too demanding on the result, because these frankly not necessary fx. But to better express what blur edge i try to get, I made a little photoshop here.

left it photoshopped blur, my target i want to get with light, right original from pixi-light sans-titre-1

It may not be possible at the moment, but I think it will give the result with a blur filter. Do you know if the filters can work on a light element? My try did not work, but if they supposed to work, I'll investigate deeper.

jonlepage commented 6 years ago

@ivanpopelyshev i find a very more good example https://webglfundamentals.org/webgl/webgl-3d-lighting-spot-falloff.html https://webglfundamentals.org/webgl/lessons/webgl-3d-lighting-spot.html I just have to study now how the shader works in pixi and how implemented new .frag there is a tutorial?