java.lang.Object
de.grogra.gpuflux.imp3d.shading.SpectralShaderPresets
Factory class for physically-calibrated spectral shader presets.
Each factory method creates a Phong, GGX, or Ward instance
with all channels replaced by ChannelSPD objects backed by
IrregularSpectralCurve data over the PAR range 400–700 nm (10 nm steps,
31 sample points). Non-spectral fields (roughness, shininess, etc.) are set
by delegating to the corresponding RGB preset first.
Usage:
GGX leafUpper = SpectralShaderPresets.ggx(ShaderPreset.LEAF_ADAXIAL); Ward brushed = SpectralShaderPresets.ward(ShaderPreset.BRUSHED_METAL); Phong glass = SpectralShaderPresets.phong(ShaderPreset.GLASS);
Data sources
- Leaf reflectance/transmittance: Woolley (1971); Jacquemoud & Baret (1990) PROSPECT model; LOPEX93 database (Hosgood et al. 1995).
- Soil: Baumgardner et al. (1985) spectral reflectance of soil types.
- Metal (aluminium): Palik & Ghosh (1985) optical constants.
- Glass / greenhouse glass: measured transmission curves for standard float glass and horticultural iron-rich glass.
- Plastic film (LDPE): representative manufacturer data.
- Author:
- MH at YNL 2026
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final float[]Unpolished aluminium greenhouse frame reflectance.static final float[]Concrete reflectance — medium gray, nearly flat spectrum.static final float[]High-albedo flat reference (≈95% across PAR; Lambertian reference white).static final float[]Diffuser panel: 46% flat reflectance component.static final float[]Diffuser panel: 46% flat transmittance component.static final float[]Diffusing opal plastic — ~30% diffuse reflectance (flat).static final float[]Diffusing opal plastic — ~30% diffuse transmittance (flat).static final float[]Standard float glass transmittance.static final float[]Horticultural greenhouse glass transmittance.static final float[]Green broadleaf — abaxial (lower) side reflectance.static final float[]Abaxial transmittance (same as adaxial — mesophyll is symmetric for T).static final float[]Green broadleaf — adaxial (upper) side reflectance.static final float[]Green broadleaf transmittance (both sides similar).static final float[]Barley (Hordeum vulgare) adaxial leaf reflectance — bluish-green, waxy.static final float[]Barley leaf transmittance.static final float[]Cotton (Gossypium hirsutum) adaxial leaf reflectance — light green, large.static final float[]Cotton leaf transmittance.static final float[]Dry / senescent leaf reflectance.static final float[]Dry leaf transmittance (strongly reduced due to loss of chloroplast structure).static final float[]Juvenile leaf reflectance — very light green, strong chlorophyll absorption.static final float[]Juvenile leaf transmittance — high water content, strong absorption.static final float[]Maize (Zea mays) adaxial leaf reflectance — C4, deep green, waxy.static final float[]Maize leaf transmittance.static final float[]Rice (Oryza sativa) adaxial leaf reflectance — slightly higher green peak than broadleaf.static final float[]Rice leaf transmittance.static final float[]Senescent leaf reflectance — between mature and fully dry, yellow-green.static final float[]Senescent leaf transmittance — reduced but not fully suppressed.static final float[]Wheat (Triticum aestivum) adaxial leaf reflectance — yellow-green.static final float[]Near-perfect aluminium mirror reflectance.static final float[]LDPE plastic film transmittance (typical horticultural greenhouse film).static final float[]Polished / brushed aluminium reflectance (slightly lower than mirror due to surface oxidation; both polished and brushed share this spectral shape — anisotropy in Ward is purely geometric, not spectral).static final float[]Retroreflector approximation: 90% flat (best-effort Lambertian).static final float[]Quartz sand reflectance — yellowish-beige, monotonic rise.static final float[]Dry sandy-loam soil reflectance.static final float[]Wet sandy-loam soil reflectance.static final float[]Wavelength sampling points [nm] shared by all spectra below.static final float[]White plastic / foil reflector — high albedo, nearly flat. -
Method Summary
Modifier and TypeMethodDescriptionstatic GGXggx(ShaderPreset preset) Creates a spectrally calibratedGGXshader for the given preset.static Phongphong(ShaderPreset preset) Creates a spectrally calibratedPhongshader for the given preset.static Wardward(ShaderPreset preset) Creates a spectrally calibratedWardshader for the given preset.
-
Field Details
-
WAVELENGTHS
public static final float[] WAVELENGTHSWavelength sampling points [nm] shared by all spectra below. -
LEAF_ADAXIAL_REFL
public static final float[] LEAF_ADAXIAL_REFLGreen broadleaf — adaxial (upper) side reflectance. Shows blue/red chlorophyll absorption bands and a green peak near 550 nm. Source: Woolley (1971); LOPEX93 average. -
LEAF_ADAXIAL_TRANS
public static final float[] LEAF_ADAXIAL_TRANSGreen broadleaf transmittance (both sides similar). Source: Woolley (1971); LOPEX93 average. -
LEAF_ABAXIAL_REFL
public static final float[] LEAF_ABAXIAL_REFLGreen broadleaf — abaxial (lower) side reflectance. Slightly higher than adaxial due to spongy mesophyll scattering. -
LEAF_ABAXIAL_TRANS
public static final float[] LEAF_ABAXIAL_TRANSAbaxial transmittance (same as adaxial — mesophyll is symmetric for T). -
LEAF_DRY_REFL
public static final float[] LEAF_DRY_REFLDry / senescent leaf reflectance. Chlorophyll degraded: blue/red absorption bands flatten, overall reflectance rises, colour shifts toward yellow-brown. -
LEAF_DRY_TRANS
public static final float[] LEAF_DRY_TRANSDry leaf transmittance (strongly reduced due to loss of chloroplast structure). -
SOIL_DRY_REFL
public static final float[] SOIL_DRY_REFLDry sandy-loam soil reflectance. Characteristic monotonic increase from blue to red. -
SOIL_WET_REFL
public static final float[] SOIL_WET_REFLWet sandy-loam soil reflectance. Water darkens the soil by filling pore air spaces (~50% of dry values). -
MIRROR_REFL
public static final float[] MIRROR_REFLNear-perfect aluminium mirror reflectance. Slightly rising toward longer wavelengths (slight dip below 450 nm). -
POLISHED_METAL_REFL
public static final float[] POLISHED_METAL_REFLPolished / brushed aluminium reflectance (slightly lower than mirror due to surface oxidation; both polished and brushed share this spectral shape — anisotropy in Ward is purely geometric, not spectral). -
GLASS_TRANS
public static final float[] GLASS_TRANSStandard float glass transmittance. High transmission (86–89%) across PAR, decreasing slightly toward UV. -
GREENHOUSE_GLASS_TRANS
public static final float[] GREENHOUSE_GLASS_TRANSHorticultural greenhouse glass transmittance. Iron content causes selective absorption in blue/green, reducing overall transmission to ~78–85% across PAR. -
PLASTIC_FILM_TRANS
public static final float[] PLASTIC_FILM_TRANSLDPE plastic film transmittance (typical horticultural greenhouse film). Very flat spectrum, slightly higher transmission than glass (~84–88%). -
DIFFUSE_REFL
public static final float[] DIFFUSE_REFLHigh-albedo flat reference (≈95% across PAR; Lambertian reference white). -
DIFFUSER_REFL
public static final float[] DIFFUSER_REFLDiffuser panel: 46% flat reflectance component. -
DIFFUSER_TRANS
public static final float[] DIFFUSER_TRANSDiffuser panel: 46% flat transmittance component. -
RETROREFLECTOR_REFL
public static final float[] RETROREFLECTOR_REFLRetroreflector approximation: 90% flat (best-effort Lambertian). -
SAND_REFL
public static final float[] SAND_REFLQuartz sand reflectance — yellowish-beige, monotonic rise. -
CONCRETE_REFL
public static final float[] CONCRETE_REFLConcrete reflectance — medium gray, nearly flat spectrum. -
WHITE_PLASTIC_REFL
public static final float[] WHITE_PLASTIC_REFLWhite plastic / foil reflector — high albedo, nearly flat. -
ALUMINIUM_GREENHOUSE_REFL
public static final float[] ALUMINIUM_GREENHOUSE_REFLUnpolished aluminium greenhouse frame reflectance. -
DIFFUSING_PLASTIC_REFL
public static final float[] DIFFUSING_PLASTIC_REFLDiffusing opal plastic — ~30% diffuse reflectance (flat). -
DIFFUSING_PLASTIC_TRANS
public static final float[] DIFFUSING_PLASTIC_TRANSDiffusing opal plastic — ~30% diffuse transmittance (flat). -
LEAF_RICE_REFL
public static final float[] LEAF_RICE_REFLRice (Oryza sativa) adaxial leaf reflectance — slightly higher green peak than broadleaf. -
LEAF_RICE_TRANS
public static final float[] LEAF_RICE_TRANSRice leaf transmittance. -
LEAF_BARLEY_REFL
public static final float[] LEAF_BARLEY_REFLBarley (Hordeum vulgare) adaxial leaf reflectance — bluish-green, waxy. -
LEAF_BARLEY_TRANS
public static final float[] LEAF_BARLEY_TRANSBarley leaf transmittance. -
LEAF_WHEAT_REFL
public static final float[] LEAF_WHEAT_REFLWheat (Triticum aestivum) adaxial leaf reflectance — yellow-green. -
LEAF_COTTON_REFL
public static final float[] LEAF_COTTON_REFLCotton (Gossypium hirsutum) adaxial leaf reflectance — light green, large. -
LEAF_COTTON_TRANS
public static final float[] LEAF_COTTON_TRANSCotton leaf transmittance. -
LEAF_MAIZE_REFL
public static final float[] LEAF_MAIZE_REFLMaize (Zea mays) adaxial leaf reflectance — C4, deep green, waxy. -
LEAF_MAIZE_TRANS
public static final float[] LEAF_MAIZE_TRANSMaize leaf transmittance. -
LEAF_JUVENILE_REFL
public static final float[] LEAF_JUVENILE_REFLJuvenile leaf reflectance — very light green, strong chlorophyll absorption. -
LEAF_JUVENILE_TRANS
public static final float[] LEAF_JUVENILE_TRANSJuvenile leaf transmittance — high water content, strong absorption. -
LEAF_SENESCENT_REFL
public static final float[] LEAF_SENESCENT_REFLSenescent leaf reflectance — between mature and fully dry, yellow-green. -
LEAF_SENESCENT_TRANS
public static final float[] LEAF_SENESCENT_TRANSSenescent leaf transmittance — reduced but not fully suppressed.
-
-
Method Details
-
ggx
Creates a spectrally calibratedGGXshader for the given preset.- Parameters:
preset- the desired material preset- Returns:
- a new GGX instance with spectral ChannelSPD diffuse/transparency channels
-
ward
Creates a spectrally calibratedWardshader for the given preset.- Parameters:
preset- the desired material preset- Returns:
- a new Ward instance with spectral ChannelSPD diffuse/transparency channels
-
phong
Creates a spectrally calibratedPhongshader for the given preset.- Parameters:
preset- the desired material preset- Returns:
- a new Phong instance with spectral ChannelSPD diffuse/transparency channels
-