Rendering image with wgpu-rs

Hei Rust community, i have been in trouble with a task for a long time and haven't been able to find the solution my self.

I would like to render images with wgpu-rs and image-rs, i have made a repository showing how much progress have i made with it.

https://github.com/tonis2/wgpu-rs-image

Currently it loads the image, render's it to the rectangle, but it does'e not look like and image, it just fills the rectangle with a color from the image.

The bug may lie somewhere in my fragment shader, or perhaps i am sizing the image texture wrong, there are my guesses.

This would help me so much if someone can help me solve this issue.

A single color from the image most certainly means that your scale is off. You're probably only seeing a single pixel of your image because it's that large.

Unfortunately, I don't know enough about wgpu-rs to be able to spot the error in the code.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.