Search code examples
graphicsrenderingdeferred

In Deferred Rendering would it be practical to replace the texture buffers with a material and UV buffer?


I tried putting all I could into the question but here's the flesh of it,

Would it be practical to make a deferred renderer which instead of having a Diffuse / Specular Buffer it had a Material / UV Buffer, The Materials would be handled similar to tiled light culling, the shader would be passed the required textures (specular, diffuse, glow, decal, etc. etc.) and sample them using the UVs in the UV buffer.

I was just trying to think of a way to get the benefits of deferred rendering and the flexibility of forward rendering, I couldn't think of a reason why this would get the worst of both, but I'm not able to find any information on anything similar so I don't know what its pros and cons are in practicality.


Solution

  • I can't how this method would be an improvement on normal deferred rendering. The main disadvantages of deferred rendering are passing large buffers, complications of multiple lighting models, transparency and anti-aliasing.

    Your proposed method would require huge buffers to store all the different textures for all your models, which would take up much more space than a diffuse and specular buffer.

    Your method would make no improvement on lighting models as it would still require a material ID buffer and a complex shader for lighting.

    Your method would not solve transparency or anti-aliasing.

    Overall, a material and uv buffer could easily be replaced by just a diffuse buffer containing the colour on the material at the uv coordinate, as in normal deferred rendering.

    EDIT: It would probably be practical in the circumstances you have described, with multiple (e.g. glow, diffuse, gloss, specular...) buffers to use these as textures, and only load one set for each material. However it will only save a small amount of bandwidth, as a normal setup would just require screen-sized textures, compared to the material textures you are suggesting. Also there would probably be a loss in performance due to switching multiple textures for every material.