CaffeineViking / vkhr

Real-Time Hybrid Hair Rendering using Vulkan™
MIT License
446 stars 34 forks source link

Add Simple Blinn-Phong Mesh Renderer #14

Closed CaffeineViking closed 5 years ago

CaffeineViking commented 5 years ago

We should eventually also add a simple mesh renderer for OBJ files to see the effects of shadow maps on curved surfaces, instead of only the self-shadows we have now, and also to take advantage of the the OIT optimization in Dominik's thesis, which ignores strands that are occluded by an object (e.g. a head). This is not priority work just yet, but I want to keep this issue here so I don't forget about it. My plan is just to use TinyOBJLoader and use the good'ol Blinn-Phong reflection model, to keep things simple. Also by doing this we can more easily compare our results with Cem Yuksel's paper (and anybody that uses his assets), since they usually use the woman.obj (all papers which use his hair assets use it, so we should also do this too).

CaffeineViking commented 5 years ago

Completed this as a side-task, still need to integrate texture mapping of the diffuse and bump maps. It also reads and writes to the shadow map depth buffer, so it both casts and receives shadows correctly. This was something that was needed to be done sooner or later when integrating Dominik's compute pass as it does assume that there is a mesh there to kill half the strands (effectively giving 2x better performance for free).