Closed finscn closed 6 years ago
I don't know what you mean. Can you try explaining or showing?
The shape of shockwave is not always a circle.
Only When the canvas is a square , The shape of shockwave is circle.
I believe that's intentional.
Why ? in the real game, what ever the game resolution ( 4:3 or 16:9 ) , the shockwave should always be a circle.
@bigtimebuddy . in filter , I use this code for computing the distance of a texture-point and center
:
(uCenter
use viewport coord, the unit is pixel
)
vec2 center = uCenter.xy / filterArea.xy;
vec2 dir = vec2(center - vTextureCoord);
float dist = length(vec2(dir.x, dir.y * filterArea.y / filterArea.x));
I think the code for computing
dist
has bug.