na-winit-wgpu: update shader and use native-activity instead of game-activity

This commit is contained in:
msiglreith
2022-09-18 16:10:07 +02:00
committed by Robert Bragg
parent bc177292d2
commit 5fbc26c61f
2 changed files with 6 additions and 6 deletions
+1 -1
View File
@@ -16,7 +16,7 @@ env_logger = "0.9"
[target.'cfg(target_os = "android")'.dependencies]
android_logger = "0.11.0"
android-activity = { version = "0.3", features = [ "game-activity" ] }
android-activity = { version = "0.3", features = [ "native-activity" ] }
[patch.crates-io]
+5 -5
View File
@@ -1,11 +1,11 @@
[[stage(vertex)]]
fn vs_main([[builtin(vertex_index)]] in_vertex_index: u32) -> [[builtin(position)]] vec4<f32> {
@vertex
fn vs_main(@builtin(vertex_index) in_vertex_index: u32) -> @builtin(position) vec4<f32> {
let x = f32(i32(in_vertex_index) - 1);
let y = f32(i32(in_vertex_index & 1u) * 2 - 1);
return vec4<f32>(x, y, 0.0, 1.0);
}
[[stage(fragment)]]
fn fs_main() -> [[location(0)]] vec4<f32> {
@fragment
fn fs_main() -> @location(0) vec4<f32> {
return vec4<f32>(1.0, 0.0, 0.0, 1.0);
}
}