java.lang.Object
de.grogra.glsl.material.channel.GLSLChannelMap
de.grogra.glsl.material.channel.GLSLChannelSPD
GLSL channel map for spectral
ChannelSPD channels.
Converts the spectral curve to a gamma-corrected sRGB constant at shader
compilation time via ColorMap.getAverageColor() and emits it as a
vec3 literal. The colour stays fixed until the shader is recompiled.
Uses ColorMap (available in the math module) to avoid a
hard compile-time dependency on the GPUFlux module. The runtime class is
resolved once via Class.forName(java.lang.String) and cached in
.invalid reference
#CHANNEL_SPD_CLASS
- Author:
- M Henke at YNL 2026
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongenerate(ChannelMap inp, MaterialConfiguration cs, GLSLChannelMap inpChan, int channel) This should be used instead of the other oneNot used —instanceForName()provides the classloader-safe key.Returns the fully-qualified name of theChannelMapclass this handler covers.Methods inherited from class de.grogra.glsl.material.channel.GLSLChannelMap
generateResult, generateResult, generateResultWithChannelDefault, getGLSLObject, getMaxResultType, initMap, mayDiscard
-
Constructor Details
-
GLSLChannelSPD
public GLSLChannelSPD()
-
-
Method Details
-
generate
public Result generate(ChannelMap inp, MaterialConfiguration cs, GLSLChannelMap inpChan, int channel) Description copied from class:GLSLChannelMapThis should be used instead of the other one- Specified by:
generatein classGLSLChannelMap- Parameters:
inp-cs-inpChan-channel-- Returns:
-
instanceFor
Not used —instanceForName()provides the classloader-safe key.- Specified by:
instanceForin classGLSLChannelMap
-
instanceForName
Description copied from class:GLSLChannelMapReturns the fully-qualified name of theChannelMapclass this handler covers. Used byChannelCollectionfor classloader-safe lookup (OSGi plugins each have their own classloader, soClassidentity cannot be used as a map key across plugin boundaries).The default delegates to
GLSLChannelMap.instanceFor(). Subclasses that handle classes from a foreign plugin (e.g.ChannelSPDin the GPUFlux plugin) should override this to return a string literal so that no cross-loaderClassobject is required.- Overrides:
instanceForNamein classGLSLChannelMap
-