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

Update wgpu-rs and add Linux support #7

Merged
merged 4 commits into from
Jun 20, 2020

Conversation

fourbytes
Copy link
Contributor

@fourbytes fourbytes commented May 7, 2020

I'm quite interested in this project and have been considering doing something similar for a while now, so I figured I'd try and get it running on Linux and update all the dependencies while I'm at it. It's been a while since I've touched Rust, so please point out anything I've done incorrectly.

This pull request isn't done yet, however so far:

  • All dependencies updated, including wgpu-rs to 0.5.
  • Rendering works on Linux with a Vulkan backend (caveat that it only seems to render or collide with the current chunk, I'm unable to test whether this issue is also present with the DX12 backend).
  • I have also tested on macOS with metal as the backend, rendering works out of the box. I have noticed that keyboard events do not work however, I'm guessing related to Keyboard input not captured on latest macOS 10.15.2 system rust-windowing/winit#1470.

…n). Done through direnv. We also don't need to center the cursor every frame if we're grabbing it properly.
…a different view projection correction per backend. Updated dependencies as well.
@fourbytes fourbytes changed the title Update to wgpu-rs 0.5 Update wgpu-rs and add Linux support May 8, 2020
Copy link
Owner

@Technici4n Technici4n left a comment

Choose a reason for hiding this comment

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

Hi, many thanks for the update! I just tested on Windows with DX12 and it worked perfectly. There is still a small issue with gui rectangles on the bottom of the screen, but I will fix it when this is merged. If you are willing to make a small change or two we can merge this very soon!
Sorry for the delay, I am still very busy with my exams right now, I will resume development this summer.

@@ -0,0 +1,3 @@
window_size = [1600, 900]
Copy link
Owner

Choose a reason for hiding this comment

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

This shouldn't be commited, and the very small render distance explains why only one chunk is displayed at the time.

Copy link
Owner

Choose a reason for hiding this comment

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

Could you also add this file to the .gitignore?

binding: 2,
visibility: wgpu::ShaderStage::FRAGMENT,
ty: wgpu::BindingType::SampledTexture {
component_type: wgpu::TextureComponentType::Float, // TODO: This right?
Copy link
Owner

Choose a reason for hiding this comment

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

I think it should be Uint.

@@ -0,0 +1 @@
export RUST_LOG=voxel_rs_client=debug,voxel_rs_common=debug,voxel_rs_server=debug,wgpu_core=warn,gfx_backend_vulkan=warn
Copy link
Owner

Choose a reason for hiding this comment

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

I'm not fond of having this file in the tree, I think it should be removed. You can add it to the .gitignore though! When this is merged, I will add a note in the README.

@Technici4n Technici4n merged commit 9948629 into Technici4n:master Jun 20, 2020
@Technici4n
Copy link
Owner

Thanks a lot for the pull request, I will implement the changes myself!

@fourbytes fourbytes deleted the wgpu0.5 branch December 23, 2020 16:27
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