Some changes to renderer, mostly a merge fix.
Merge https://github.com/Merigrim/indafps
Merge fix.