Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

G-Buffer video memory compression #57

Open
japsuu opened this issue Sep 9, 2024 · 0 comments
Open

G-Buffer video memory compression #57

japsuu opened this issue Sep 9, 2024 · 0 comments
Labels
feature request Request a new feature
Milestone

Comments

@japsuu
Copy link
Owner

japsuu commented Sep 9, 2024

Is your feature request related to a problem? Please describe.
Currently, the G-Buffer takes up 100 MB video memory.

Not all the current buffers are necessary, and some have unnecessarily large texture formats.

The following buffers are currently used:

Albedo & AO: RGBA16F = 8 bytes
Normal & Metalness: RGBA16F = 8 bytes
Position & Roughness: RGBA16F = 8 bytes
Emission: RGB16F = 6 bytes
Velocity: RG16F = 4 bytes
ObjectID: R32F = 4 bytes
Unlit: RGBA16F = 8 bytes
Depth: Depth24 = 3 bytes

Which is 49 bytes per pixel.

For a 1920x1080 screen that would make
1920x1080x49 = 101606400 bytes (101 MB)

Describe the solution you'd like
Remove the unnecessary buffers (unlit) and compress the existing ones further.
For example, normals could be stored using Signed Octahedron Normal Encoding

Additional context
https://www.reddit.com/r/opengl/comments/z2kdgm/deferred_rendering_reducing_the_size_of_the/
https://aras-p.info/texts/CompactNormalStorage.html
https://johnwhite3d.blogspot.com/2017/10/signed-octahedron-normal-encoding.html

@japsuu japsuu added the feature request Request a new feature label Sep 9, 2024
@japsuu japsuu added this to the 1.0 milestone Sep 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request Request a new feature
Projects
Status: Todo
Development

No branches or pull requests

1 participant