Day 6-7 : Hard shadow

Categories AShaderEveryDay, WIPs

         A basic hard shadow implementation : for each pixel, I compute the distance from the pixel position to the light direction. After X iteration, if the distance is lower than 0.0001, there are an object between the pixel position and the light then the pixel is shaded.


A simple hard shadow implementation
(click on the shader box title to see the code )

Day 5 : Restructuration

Categories AShaderEveryDay, WIPs

       In order to work in peace, today I rewrote all the shader from start, split the direction and ray computation in function to improve the modularity and understanding. The final render is also improved (more detailed) by reducing the ERROR check in the surface finding step.


Code restructuration.
(click on the shader box title to see the code )

Day 3 : Faking basic light

Categories AShaderEveryDay, WIPs

Today I went through a lot of technical papers about Raymarching (I will post the most interesting of them tomorrow), BRDF and other stuff; but I didn’t catch all the details about them and so only did that basic fake diffuse material. Tomorrow I will reading them again step by step to make a  basic  light  system in the shader.


First attempt to make some basic Raymarching light.
(click on the shader box title to see the code )