mirror of
https://github.com/rust-mobile/android-activity.git
synced 2026-07-10 08:44:11 +00:00
na-winit-wgpu: update shader and use native-activity instead of game-activity
This commit is contained in:
@@ -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]
|
||||
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user