Hey there! It’s been a while 👀 I’ve found that I’ve been copying around some shader code from different files here and there, and I thought it’d be handy for me and for you to have those around in a new Shader Bits post. Let’s get started~ World-space reconstruction While I was creating yet another …
Lately I’ve been working more with depth-based image effects and I often had to search through my archive to find examples of using the camera’s depth texture. Therefore, this Shader Bits post will be a bit different from the other ones. Since the subject is more relevant to image effects, this post won’t have the …
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 …
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 …