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

Voxel light volumes #51

Open
johanhenriksson opened this issue Feb 18, 2023 · 0 comments
Open

Voxel light volumes #51

johanhenriksson opened this issue Feb 18, 2023 · 0 comments

Comments

@johanhenriksson
Copy link
Owner

johanhenriksson commented Feb 18, 2023

Current issues:

  • Adding noise to the voxel colors makes things look more interesting, but kills any chance of mesh optimization
  • Using vertex colors for ambient occlusion kills any chance of mesh optimization, and causes weird blending due to the triangulation of the faces.
  • How to implement per-face lighting (or better) while merging voxel faces?

Idea:

  • Add a 3D texture for each voxel chunk, with a single byte for each voxel representing the light/occlusion at the center of that voxel.
  • Pass untransformed vertex coords to the fragment shader, and use them to sample the light volume.

Considerations:

  • Light volume textures will be quite large. Will the saved memory from mesh optimization make up for the memory used to store the light data?
  • How much will the per-fragment lighting improve overall visual fidelity? It will presumably be more costly due to the large amount of added texture lookups.

Something similar could be used to sample noise, instead of embedding it into the vertex data.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant