Back again with some more bits of code for your shader needs! This time, we’ll see how to get the distance of the camera from our object, as well as the vectors that corresponds to the viewing direction and the model’s normals. Like before, this post will include the code bits for both vertex-fragment and …
Month: October 2017
Debuting a new post series that will hopefully feature more posts in the future, tonight I just wanted to mention some quick tips that could be really useful for lots of use cases! This time, we’ll see how to get an object’s position in world and screen space, for both vertex-fragment and surface shaders. So …