GPUImage3 icon indicating copy to clipboard operation
GPUImage3 copied to clipboard

Crash when running vignette

Open useobjc opened this issue 4 years ago • 2 comments

Reproduce step:

  1. Run FilterShowcase example
  2. Select Vignette filter

Then, app will crash with next exception:

validateFunctionArguments:3485: failed assertion `Fragment Function(vignetteFragment): 
argument uniform[0] from buffer(1) with offset(0) and length(40) has space for 40 bytes, but argument has a length(48).'

useobjc avatar Mar 12 '20 02:03 useobjc

I have the same problem.

tianye2856 avatar Jan 12 '21 11:01 tianye2856

Hi. There is some problem with sending VignetteUniform to the Vignette shader. To quick fix and run sample you can change Vignette.metal file.

typedef struct {
    float3 vignetteCenter;
    float3 vignetteColor;
    float vignetteStart;
    float vignetteEnd;
    float2 junk_padding; # <-- Add this line
} VignetteUniform;

agorskih avatar Apr 23 '21 09:04 agorskih

This should be fixed as of #91

BradLarson avatar Feb 19 '24 01:02 BradLarson