GpuKernelProbe

Runs a field kernel in a vertex shader and reads the values back: the GPU half of the parity of field-presentation §FVK-8.

In the namespace field::gpu. Declared in src/libs/libfield/field/gpu/GpuKernelProbe.hpp.

Detailed description

The kernel text comes from kernelShaderText(), as the tet and mesh layers splice it (§FVK-3, §FVG-2). Each row is one vertex: its slots are vertex inputs, the vertex shader calls the kernel, and a point at pixel x of an RGBA32F row writes the value. The row is read back. So the value is the one the viewport colors with, computed by the GPU's own vertex stage.

The probe owns an offscreen QRhi and every resource it makes. It runs on the thread that called init(), outside any frame.

In this section