Labels

November 28, 2011

basic deferred shading system in GLSL

Today I made a basic deferred renderer as an exercise in a single shader using only depth buffer and inverse modelview matrix as input.
Normals and position are calculated from depth buffer. Unfortunately normals are flat shaded using this method and the shader itself is quite slow, but maybe someone finds the parts of this shader useful.



blend:
HERE
fragment shader (code is quite messy) :
HERE

4 comments:

  1. Having this improved and completely implemented in the BGE would be pretty awesome. Is this a dead project or just currently stopped?

    ReplyDelete
    Replies
    1. Hey Lars,
      It was actually just an exercise for me to understand basics behind deferred rendering. And there was lot of hacking involved to have this result. There is no really a way to evolve it further.

      Delete
    2. Ok, but who knows, maybe i a few years it will be the normal viewport method... Anyways, i think i don't have to say it, but here i do: Keep on the amazing work! (By the way, is a screen spaced reflection system planned?)

      Delete
  2. Hey, it seems like the links are down. Is there anywhere else we can get that code from?

    ReplyDelete