HEX
Server: LiteSpeed
System: Linux houston.panomity.com 6.8.0-100-generic #100-Ubuntu SMP PREEMPT_DYNAMIC Tue Jan 13 16:40:06 UTC 2026 x86_64
User: nudepix (1011)
PHP: 7.4.33
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Upload Files
File: //opt/resolve/Developer/DaVinciCTL/AlphaCircularWindow.dctl
DEFINE_DCTL_ALPHA_MODE_STRAIGHT

__DEVICE__ float smoothStep(float p_Edge0, float p_Edge1, float p_Val)
{
    p_Val = _saturatef((p_Val - p_Edge0) / (p_Edge1 - p_Edge0));
    return p_Val * p_Val * (3.0f - 2.0f * p_Val);
}

__DEVICE__ float4 transform(int p_Width, int p_Height, int p_X, int p_Y, float p_R, float p_G, float p_B, float p_A)
{
    const float radius = 0.5f;
    const float smoothAmount = 0.1f;

    const float centerX = 0.5f * p_Width;
    const float centerY = 0.5f * p_Height;
    const float dist = _hypotf(p_X - centerX, p_Y - centerY) / min(p_Width, p_Height);

    p_A = smoothStep(smoothAmount, -smoothAmount, dist - radius);

    return make_float4(p_R, p_G, p_B, p_A);
}