Skip to content

Moebius shader code to node #124

Answered by pragma37
JPLost asked this question in Q&A
Sep 14, 2021 · 2 comments · 2 replies
Discussion options

You must be logged in to vote

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:

bool is_prepass()
{
    #i…

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
2 replies
@JPLost
Comment options

@pragma37
Comment options

Answer selected by JPLost
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants