Skip to content

use custom material 2d, with same logic draw part of texture, get different result with wgpu. #14992

Open
@alexniver

Description

@alexniver

Bevy version

0.14.1

  • the Rust version you're using (you can get this by running cargo --version)
    cargo 1.80.1 (376290515 2024-07-16)
AdapterInfo { name: "AMD Radeon RX 6650 XT (RADV NAVI23)", vendor: 4098, device: 29679, device_type: DiscreteGp
u, driver: "radv", driver_info: "Mesa 24.1.6-arch1.1", backend: Vulkan }

What you did

I have a tilemap texture, size (8, 2), I want draw the tile (0,0)
tilemap

the fragment logic is

@fragment
fn fragment(in: VertexOut) -> @location(0) vec4<f32> {
    var uv = in.uv / vec2f(8.0, 2.0);
    return textureSample(texture, texture_sampler, uv);
}

What went wrong

In Bevy, there is a buggy one pixel line in the right
bevy_one_line_buggy

In Wgpu, it's perfect
wgpu_perfect

Additional information

bevy project
wgpu project

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-RenderingDrawing game state to the screenC-BugAn unexpected or incorrect behaviorS-Needs-InvestigationThis issue requires detective work to figure out what's going wrong

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions