Quantcast
Channel: Latest Questions on Unity Answers
Viewing all articles
Browse latest Browse all 171066

Simple directional light shader via vert/frag

$
0
0
Could someone provide me with a simple lambert lighting model shader that uses a directional light. I'd like to use that as a jumping off point to a more complex effect that i'm trying to achieve. I ask because there are many gaps in my knowledge of shaders in unity, and I keep hitting a wall on the simplest things. As an aside, I'm simply trying to do per-face lighting on a model, however if I create a surface shader the function ddx / dFdx are not available to me. -- However If I create my own vertex/fragment shader I am able to use the dFdx/ddx funcitons, but I lose all the lighting information

Viewing all articles
Browse latest Browse all 171066

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>