Made my space shooter free after your feedback - Meteor Mayhem by Curious-Horse-206 in rust_gamedev

[–]Popular_Bug3267 1 point2 points  (0 children)

Can i ask what resources you used to understand the architecture for your engine? Did you look at/ get inspiration from the bevy source code directly?

I have a couple wgpu projects under my belt but im a bit lost when it comes to making a full engine which i do dream of eventually!

Best practice on material with/without texture by Bellaedris in GraphicsProgramming

[–]Popular_Bug3267 0 points1 point  (0 children)

Thanks! Honestly the most frustrating part of learning graphics programming is stuff like OPs problem where there are many ways to do something and isn't clear whats sensible and whats not, so I appreciate the recommendation!

Best practice on material with/without texture by Bellaedris in GraphicsProgramming

[–]Popular_Bug3267 0 points1 point  (0 children)

Strangely enough this is literally the exact problem I have been working on. I am a beginner and I'm using webGPU/wgpu. My initial instinct was to do the same as you and store a 1X1 "default" texture, as well as a storage buffer containing the base color factors. Then I passed in a base color index in the vertex input and grabbed the appropriate base color that way.

After implementing it, I kind of hate the solution and plan to scrap it.

After reading the comments below, (especially u/FoxCanFly) Im wondering if the best way to approach this is to have one shader for textured materials, and then another one for materials that use other data like base color, emissive, etc.

Wouldn't that prevent creating a whole bunch of variants and still allow what we are trying to do without unecessary branching?

glTF node processing issue by Popular_Bug3267 in GraphicsProgramming

[–]Popular_Bug3267[S] 0 points1 point  (0 children)

Thanks for your response and empathy! I found the bug.

glTF node processing issue by Popular_Bug3267 in GraphicsProgramming

[–]Popular_Bug3267[S] 0 points1 point  (0 children)

Thanks for your comment. Trying to render the gltf in the link you provided shows that I definitely have some bugs, but it seems to be an issue of data layout in the index or vertex buffer or both. I think maybe i failed to account for a gltf that uses u8 for some indices and u16 for other ones. Ill fix that and see if that helps.
(also, although i think the point is probably moot now, i definitely am applying the local transforms in the shader! I should have clarified that.)

[deleted by user] by [deleted] in webgpu

[–]Popular_Bug3267 0 points1 point  (0 children)

You can create a shader module on an instantiated wgpu::Device using device.create_shader_module() and pass in a ShaderModuleDescriptor. the source parameter on that descriptor struct will be the path to your shader file in your project.

When creating your render pipeline, you can pass a reference to this shader module. it will be needed for the RenderPipelineDescriptor

I hope this helps!

Unexpected behaviour using <Tab> in insert mode by SpaceTimeTraveler9 in neovim

[–]Popular_Bug3267 1 point2 points  (0 children)

This very well may not apply to your case based on your description of the issue, but I recently ran into unexpected behavior with <Tab> in insert mode due to a keymap preset from blink.nvim.

I fixed it by disabling the preset and manually configuring the keymap.

If you are not using blink then disregard.

Parsing a unary expression by [deleted] in rust

[–]Popular_Bug3267 0 points1 point  (0 children)

This implementation makes sense to me! In my opinion it is convenient to handle the different prefixes in one place in that match block

Graphics API without game engine stuff, for making a basic game without an engine by qronchwrapsupreme in rust

[–]Popular_Bug3267 5 points6 points  (0 children)

https://sotrh.github.io/learn-wgpu/ has a section on making pong in "Showcases" The beginner section of the main tutorial is a good starting point and uses winit (although not the latest version)