Created
June 26, 2021 12:10
-
-
Save mkvenkit/b8d649aa25cb8573d220fc5431d10ae5 to your computer and use it in GitHub Desktop.
Rim lighting shader
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
float rim = (1.0 - dot(N, V)); | |
rim = smoothstep(0.0, 1.0, rim); | |
float rim_exp = 3.5; | |
rim = pow(rim, rim_exp); | |
vec3 rim_col = vec3(0.1, 0.1, 0.1); | |
crim = rim * rim_col; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment