Skip to content

Rim Light question #585

Discussion options

You must be logged in to vote

You would need the light vector in view space and use it as the angle for the rim.
This is not easy to do from nodes, so here's a function that you can drop into a plugin:

#if defined(IS_MESH_SHADER) || defined(IS_SCREEN_SHADER)

#ifdef IS_MESH_SHADER
/*  META
    @normal: subtype=Normal; default=NORMAL;
    @rim_length: default=1.0;
    @length_fallof: default=1.0;
    @thickness: default=0.5;
    @thickness_fallof: default=0.0;
    @light_groups: default=MATERIAL_LIGHT_GROUPS;
*/
#else
/*  META
    @normal: subtype=Normal; default=NORMAL;
    @rim_length: default=1.0;
    @length_fallof: default=1.0;
    @thickness: default=0.5;
    @thickness_fallof: default=0.0;
    @light_groups: def…

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@rosstheblenderanimator
Comment options

@pragma37
Comment options

@rosstheblenderanimator
Comment options

Answer selected by rosstheblenderanimator
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