BradLarson / GPUImage3

GPUImage 3 is a BSD-licensed Swift framework for GPU-accelerated video and image processing using Metal.
BSD 3-Clause "New" or "Revised" License
2.68k stars 330 forks source link

fix vignette operation crash issue #113

Closed suzp1984 closed 4 months ago

suzp1984 commented 3 years ago

Reason: Fragment Uniform buffer alignment issue.

typedef struct {
    float2 vignetteCenter;
    float3 vignetteColor;
    float vignetteStart;
    float vignetteEnd;
} VignetteUniform;

this struct occupies 48 bytes, with the last 8 bytes useless.

the similar crash happens for zoom blur, bulge distortion, pinch distortion, sphere refraction, glass crash.

BradLarson commented 4 months ago

Thanks, but I believe #91 solves this in a more robust manner.