java.lang.Object
de.grogra.glsl.material.channel.GLSLChannelMap
de.grogra.glsl.material.channel.GLSLChannelMapNode
de.grogra.glsl.material.channel.GLSLNormalMap
GL1/GLSL code generator for
NormalMap.
For Channel.NX requests, generates inline GLSL that:
- Samples the RGB tangent-space normal map texture.
- Decodes the texel from [0,1] to [-1,1].
- Builds an orthonormal TBN matrix from the surface
tangent (
dpdu), bitangent (dpdv) and normal. - Transforms the decoded tangent-space normal to world space.
- Blends the result with the original normal using the
NormalMap.getStrength()parameter.
- Author:
- MH 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 oneMethods inherited from class de.grogra.glsl.material.channel.GLSLChannelMap
generateResult, generateResult, generateResultWithChannelDefault, getGLSLObject, getMaxResultType, initMap, instanceForName, mayDiscard
-
Constructor Details
-
GLSLNormalMap
public GLSLNormalMap()
-
-
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
- Specified by:
instanceForin classGLSLChannelMap
-