YouGroove Posted February 1, 2015 Posted February 1, 2015 I have founs some good articles : http://en.wikibooks.org/wiki/GLSL_Programming/Unity/Toon_Shading#Outlines http://sunandblackcat.com/tipFullView.php?l=eng&topicid=15 I wanted to modify diffuse shader to do the code below : // higher priority: outline if (dot(viewDirection, normalDirection) < mix(_UnlitOutlineThickness, _LitOutlineThickness, max(0.0, dot(normalDirection, lightDirection)))) { fragmentColor = vec3(_LightColor0) * vec3(_OutlineColor); } Does someone know what is viewdirection, normaldirection and lightdirection in LE3 ? Quote Stop toying and make games
shadmar Posted February 1, 2015 Posted February 1, 2015 That is writen for forward rendering.. view direction is your eye vector which would be in LE: normalize( modelvertexposition.xyz - cameraposition ) normaldirection should be ex_normal or computed normals with normals map. lightdirection can't be fetched. or that is you can, but you need to calculate it in your app for 1 light and send it. 1 Quote HP Omen - 16GB - i7 - Nvidia GTX 1060 6GB
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.