mickvangelderen / clustered-light-shading

Exploring stereoscopic rendering.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Clean up

mickvangelderen opened this issue · comments

Because I'm unsure what I need, it is hard to refactor code cleanly. I'm don't have experience with writing a proper simulation/rendering loop and I hear the pipeline should:

  • update as late as possible to minimize latency
  • figure out how to properly use the OpenVR API so that we have minimal overhead and latency
  • sort the to-be-rendered objects to minimize costly OpenGL state changes
  • maybe have a deferred rendering pipeline so we can have many dynamic lights
  • somehow multiple passes which we will probably need if we have transparent objects
  • have shadow mapping
  • adjust rendering quality based on how idle the GPU is
  • many more things

It does not make sense to try and think about all these things at once. Instead we have to live with the mess for a while until it is clear that we can deduplicate and/or abstract it somehow. This can be rather hard from a motivational standpoint because you know you're writing code that you will have to modify or delete many times. You're really writing the code to make it explicit what data you need, how it affects other data and what operations need to be performed on it. Only when it is explicit and we understand the relations and corner cases can we start to think about cleaning it up.