Adding the ability to access other buffers in Godot's viewports

SIsilicon28SIsilicon28 Posts: 748Moderator

Hey hey! I have something to show today. :) For a while, I was upset that Godot does not have ability to access the depth buffer. This sometimes limits what visual effects I can do. Well a week ago, I started working on a feature that allows you to access not only the depth buffer, but also buffers that are used in mid post processing (Normal, roughness, specular, diffuse, etc..).
ezgif com-video-to-gif (1)
The depth buffer works fine by the way. It just looks all red because of how its data is stored.

This will work in both GLES3 and 2, although obviously, GLES2 will have less accessible buffers than GLES3.
I'm making this feaure in Godot 3.2, because I can't work with Vulkan yet. :( Whether this feature get's added to the engine or not, I've learnt a lot doing this, and plan on implementing other features in the near future probably. :)

Here is the link to the Godot proposal.
https://github.com/godotengine/godot-proposals/issues/798


Tags :

Comments

  • MegalomaniakMegalomaniak Posts: 2,768Admin

    So you are basically implementing a deferred/inferred renderer on top of the forward renderer?

  • SIsilicon28SIsilicon28 Posts: 748Moderator

    More like exposing what already exists. Having access to the depth and normal textures are especially useful. for screen space effects, like screen space global illumination, especially since you'd then be able to render the effect at half resolution.

  • MegalomaniakMegalomaniak Posts: 2,768Admin

    So you are basically implementing a inferred renderer then on top of the forward renderer.

  • SIsilicon28SIsilicon28 Posts: 748Moderator

    Eh. I guess you could think of it like that.

  • MegalomaniakMegalomaniak Posts: 2,768Admin
    edited May 17

    Yeah, seems I misrecalled the term, I was thinking of inferred lighting which is essentially an improvement on deferred rendering. You seem to be implementing the things that would be necessary for implementing in turn something like it.

    https://dl.acm.org/doi/10.1145/1581073.1581080

    I believe the original frostbyte was the first engine to implement this. Which is where I recall it from.

  • TwistedTwiglegTwistedTwigleg Posts: 2,847Admin

    Awesome! This is definitely something I could have used previously when I was working on my custom decal-like shader!

Leave a Comment

BoldItalicStrikethroughOrdered listUnordered list
Emoji
Image
Align leftAlign centerAlign rightToggle HTML viewToggle full pageToggle lights
Drop image/file