SWMMVis  6.0.0-alpha.4
Qt6/C++ GIS-based graphical user interface for the SWMMVis engine (6.0.0-alpha.4)
Loading...
Searching...
No Matches
scalarfillmaterial.h File Reference
#include <QSGGeometry>
#include <QSGMaterial>
Include dependency graph for scalarfillmaterial.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  ScalarFillVertex
 
class  ScalarFillMaterial
 

Functions

const QSGGeometry::AttributeSet & scalarFillAttributes ()
 

Detailed Description

Author
Caleb Buahin caleb.nosp@m..bua.nosp@m.hin@g.nosp@m.mail.nosp@m..com
Date
2026
License\n GPL-3.0-or-later

QSG-2D-1M Phase 8 — GPU scalar→color mapping for the 2D results smooth depth fill.

Vertices carry (x, y, scalar); the fragment shader normalizes the scalar with the material's (vMin, invRange) uniforms — the exact contract of ScalarRampLut::normalize — and samples a 256×1 ramp LUT texture baked from the active ScalarFillStyle. Consequences:

  • a ramp/style edit re-bakes 256 texels + two floats instead of re-coloring every mesh vertex on the CPU,
  • a time tick uploads one float per vertex (scalar) instead of RGBA colors, and positions stay untouched either way.

Enabled by the results renderer only when OPENSWMM_QSG_SHADER_FILL=1 — shader output needs visual parity verification (plan Phase 8), so the CPU-colored path stays the default until confirmed.

Function Documentation

◆ scalarFillAttributes()

const QSGGeometry::AttributeSet & scalarFillAttributes ( )

Attribute set matching ScalarFillVertex (location 0 = vec2 position, location 1 = float scalar).

Here is the caller graph for this function: