diff options
| author | Sébastien Crozet <developer@crozet.re> | 2022-05-31 10:22:28 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-05-31 10:22:28 +0200 |
| commit | fb1bfc762c89cd8c5bd745a82998c1662a1bf196 (patch) | |
| tree | 0ece4f99d458f47f1408c78f79b85345036d3671 /src_testbed/lines/debuglines2d.wgsl | |
| parent | c630635e57624385123b4a0fb658018bc6fdba91 (diff) | |
| parent | 0640f5e660aef579a9e6b134b7066e9bcae32b8b (diff) | |
| download | rapier-fb1bfc762c89cd8c5bd745a82998c1662a1bf196.tar.gz rapier-fb1bfc762c89cd8c5bd745a82998c1662a1bf196.tar.bz2 rapier-fb1bfc762c89cd8c5bd745a82998c1662a1bf196.zip | |
Merge pull request #334 from dimforge/fixes
Some CCD and debug-render improvements
Diffstat (limited to 'src_testbed/lines/debuglines2d.wgsl')
| -rw-r--r-- | src_testbed/lines/debuglines2d.wgsl | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src_testbed/lines/debuglines2d.wgsl b/src_testbed/lines/debuglines2d.wgsl index 9316531..b722d8a 100644 --- a/src_testbed/lines/debuglines2d.wgsl +++ b/src_testbed/lines/debuglines2d.wgsl @@ -17,10 +17,11 @@ struct VertexOutput { fn vertex(vertex: Vertex) -> VertexOutput { var out: VertexOutput; out.clip_position = view.view_proj * vec4<f32>(vertex.place, 1.0); - // What is this craziness? - out.color = vec4<f32>((vec4<u32>(vertex.color) >> vec4<u32>(0u, 8u, 16u, 24u)) & vec4<u32>(255u)) / 255.0; - //out.color = vertex.color; - //out.color = vec4<f32>(1.0, 0.0, 0.0, 1.0); + var r = f32(vertex.color & 255u) / 255.0; + var g = f32(vertex.color >> 8u & 255u) / 255.0; + var b = f32(vertex.color >> 16u & 255u) / 255.0; + var a = f32(vertex.color >> 24u & 255u) / 255.0; + out.color = vec4<f32>(r, g, b, a); return out; } |
