NDC Depth Filter

Filter

RIF_IMAGE_FILTER_NDC_DEPTH

Description

Recovers depth from normalized device coordinates (NDC).

Parameters

Parameter

Type

Input/Output

Description

viewProjMatrix

float16

input

View-projection matrix for the current frame.
Default value is the identity matrix 4x4.

Usage Example

rif_image_filter filter = nullptr;
rifContextCreateImageFilter(context, RIF_IMAGE_FILTER_NDC_DEPTH, &filter);
float mvp[16] = { -1.94444f, +0.0f, +0.0f, +0.0f, +0.0f, +1.94444f, +0.0f, -1.94444f, +0.0f, +0.0f, +1.0f, -3.0f, +0.0f, +0.0f, +1.0f, -3.0f, };
rifImageFilterSetParameter16f(filter, "viewProjMatrix", mvp);
rifCommandQueueAttachImageFilter(queue, filter, positionImage, depthImage);
rifContextExecuteCommandQueue(context, queue, nullptr, nullptr, nullptr);