Resources for custom nvivafilter for Jetpack 5.1.1 Jetson NX

Hi,
Please refer to the sample in
Nvcompositor plugs alpha is not work and alpha plugs no work - #14 by DaneLLL

The variable is the alpha value:

static char dat = 0;

It is applied to R,G,B channels in

__global__ void addLabelsKernel(int* pDevPtr, int pitch,int height, char dat){
  int row = blockIdx.y*blockDim.y + threadIdx.y;
  int col = blockIdx.x*blockDim.x + threadIdx.x;
  if (col <= pitch && row <= height && (col % 4) < 3) {
    char * pElement = (char*)pDevPtr + row * pitch + col;
    int scaled = (int)(*pElement)*(int)dat / 256;
    pElement[0] = (char)scaled;
  }
  return;
}

Please try to successfully run this sample first, and then you can refer to it for further customization.