bevyengine / bevy

A refreshingly simple data-driven game engine built in Rust
https://bevyengine.org
Apache License 2.0
36.12k stars 3.56k forks source link

Incorrectly rendered border radius #14955

Open ickshonpe opened 2 months ago

ickshonpe commented 2 months ago

Bevy version

main

What went wrong

From the borders example, the center yellow nodes should be circles but they get cut off on the right and bottom:

bad_border_radius
rparrett commented 2 months ago

Confused about the issue after the title change. Is this about the yellow nodes or the red ones?

I can't reproduce the issue with the yellow nodes on macOS (m1) with scale_factor 1.0 or 2.0 on latest main.

I suspect that the red node behavior is not a regression, but I am unable to bisect due to whatever drama is happening at wgpu right now.

oscrim commented 2 months ago

Not sure if its related to this but I also encountered a border bug. When I run the example targeting x86 it all renders as it should but when the target is wasm32 its rendered incorrectly. image

AdapterInfo { name: "ANGLE (NVIDIA Corporation, NVIDIA GeForce RTX 2070 SUPER/PCIe/SSE2, OpenGL 4.5.0)", vendor: 4318, device: 0, device_type: Other, driver: "", driver_info: "WebGL 2.0 (OpenGL ES 3.0 Chromium)", backend: Gl }

Everything renders correctly on my laptop

AdapterInfo { name: "ANGLE (AMD, AMD Radeon Vega 8 Graphics (raven LLVM 15.0.7), OpenGL 4.6)", vendor: 4098, device: 0, device_type: Other, driver: "", driver_info: "WebGL 2.0 (OpenGL ES 3.0 Chromium)", backend: Gl }
ickshonpe commented 2 months ago

Not sure if its related to this but I also encountered a border bug. When I run the example targeting x86 it all renders as it should but when the target is wasm32 its rendered incorrectly.

That's odd, the sdf should work the same on all platforms, it's just arithmetic.

oscrim commented 2 months ago

That's odd, the sdf should work the same on all platforms, it's just arithmetic.

I agree, I just tested it on my computer at work where the borders also render correctly.

AdapterInfo { name: "ANGLE (Intel, Mesa Intel(R) UHD Graphics 770 (ADL-S GT1), OpenGL 4.6)", vendor: 32902, device: 0, device_type: IntegratedGpu, driver: "WebGL 2.0 (OpenGL ES", driver_info: "3.0 Chromium)", backend: Gl }

One thing that stands out when comparing the adapter info is that on the computers where its rendered correctly its using OpenGL 4.6 while the other computer uses OpenGL 4.5.0

This seems to be a separate bug from the one in this issue so Ill create a new one