A little toolkit for single-quad fragment shader demos

8 lines
133 B

struct SceneResult {
float d;
float mat_idx;
};
SceneResult min_sr(SceneResult a, SceneResult b) {
return (a.d < b.d) ? a : b;
}