-
You had example of Moebius like shader in code. If I understand correctly, the idea is to use NPR_lit_surface. Calculate the spots, where there is shadow and bypass them by feeding this information to PixelOutput id channel? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
The get_line functions can detect lines between ID boundaries. So, for getting lines at the boundaries between light and shadows you want to assign different ids to areas in light and areas in shadows. The problem with setting IDs like that is that they are also used for detecting self shadows, so you may want to set the ID only in the PRE_PASS. bool is_prepass()
{
#ifdef PRE_PASS
{
return true
}
#else
{
return false;
}
#endif
} |
Beta Was this translation helpful? Give feedback.
-
Lets add the updated version with is_prepass node added. |
Beta Was this translation helpful? Give feedback.
The get_line functions can detect lines between ID boundaries.
By default, each object has its own ID so it detects lines between objects.
So, for getting lines at the boundaries between light and shadows you want to assign different ids to areas in light and areas in shadows.
There are many ways to implement this depending on what you want to achieve. For example:
Moebius_Nodes.zip
The problem with setting IDs like that is that they are also used for detecting self shadows, so you may want to set the ID only in the PRE_PASS.
There's no way to detect the current pass directly from nodes at the moment, but you could add this function to your custom node library: