Repository navigation
|
Is there any code available to determine the type of light source hitting the mesh? |
Answered by
pragma37
Jun 11, 2025
Replies: 1 comment
|
There's certainly code for it: Malt/Malt/Shaders/Lighting/Lighting.glsl Line 90 in 5a00fa9 However, lighting is computed inside a loop, so custom lighting is not doable withing the Inline Code node. |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
There's certainly code for it:
Malt/Malt/Shaders/Lighting/Lighting.glsl
Line 90 in 5a00fa9
However, lighting is computed inside a loop, so custom lighting is not doable withing the Inline Code node.
You may need to make a custom node instead.
You can check https://github.com/bnpr/Malt/blob/Development/Malt/Pipelines/NPR_Pipeline/Shaders/NPR_Pipeline/NPR_Shading2.glsl to see how the built-in Shading nodes are done.