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

Feat/texture updates #159

Merged
merged 9 commits into from
Apr 20, 2022

Conversation

QuantumEntangledAndy
Copy link
Contributor

@QuantumEntangledAndy QuantumEntangledAndy commented Apr 18, 2022

This adds features from #152 that I am adding here to make the PRs more modular

Specifically:

  • Adds methods to copy data from a gpu texture to an array on the cpu, (useful for debugging)
  • Changes binding of Texture3D to TextureCube which represents its actual backing data
  • Adds actual Texture3D bindings
  • Add 2D Texture array binding
  • Add a method to update the values in a texture without recreating it
    • This is needed to perform live updates of textures without having to rebind the pipeline (this is used in Voxels and SDF #152 to make voxels more easily and quickly changed on the gpu)
  • Some clippy fixes
  • Sets name on the shader, useful for debugging

Copy link
Member

@voxelias voxelias left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just couple questions, and I believe TextureKind should be re-implemented with native WGPU enum,

dotrix_core/src/assets/shader.rs Show resolved Hide resolved
dotrix_core/src/renderer.rs Show resolved Hide resolved
dotrix_core/src/renderer/bindings.rs Show resolved Hide resolved
dotrix_core/src/renderer/texture.rs Outdated Show resolved Hide resolved
dotrix_core/src/renderer/texture.rs Show resolved Hide resolved
dotrix_core/src/renderer/bindings.rs Show resolved Hide resolved
Copy link
Member

@voxelias voxelias left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you very much! This part was really wanted!

@voxelias voxelias merged commit cd709d4 into lowenware:main Apr 20, 2022
@QuantumEntangledAndy
Copy link
Contributor Author

Awesome, glad to help. I'll work these changes into my voxels and get materials working with it.

I'll see about adding a tera PR too after that

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

Successfully merging this pull request may close these issues.

2 participants