remove wgsl

This commit is contained in:
Schrottkatze 2024-05-22 09:44:39 +02:00
parent 4861d93c80
commit 7234064f12
Signed by: schrottkatze
SSH key fingerprint: SHA256:hXb3t1vINBFCiDCmhRABHX5ocdbLiKyCdKI4HK2Rbbc
2 changed files with 0 additions and 57 deletions

View file

@ -1,39 +0,0 @@
struct VertexOut {
@location(0) color: vec4<f32>,
@builtin(position) position: vec4<f32>,
};
struct Uniforms {
@size(16) angle: f32, // pad to 16 bytes
};
@group(0) @binding(0)
var<uniform> uniforms: Uniforms;
var<private> v_positions: array<vec2<f32>, 3> = array<vec2<f32>, 3>(
vec2<f32>(0.0, 1.0),
vec2<f32>(1.0, -1.0),
vec2<f32>(-1.0, -1.0),
);
var<private> v_colors: array<vec4<f32>, 3> = array<vec4<f32>, 3>(
vec4<f32>(1.0, 0.0, 0.0, 1.0),
vec4<f32>(0.0, 1.0, 0.0, 1.0),
vec4<f32>(0.0, 0.0, 1.0, 1.0),
);
@vertex
fn vs_main(@builtin(vertex_index) v_idx: u32) -> VertexOut {
var out: VertexOut;
out.position = vec4<f32>(v_positions[v_idx], 0.0, 1.0);
out.position.x = out.position.x * cos(uniforms.angle);
out.color = v_colors[v_idx];
return out;
}
@fragment
fn fs_main(in: VertexOut) -> @location(0) vec4<f32> {
return in.color;
}

View file

@ -1,18 +0,0 @@
var<private> v_positions: array<vec2<f32>, 6> = array<vec2<f32>, 6>(
vec2<f32>(1., 1.),
vec2<f32>(1., -1.),
vec2<f32>(-1., 1.),
vec2<f32>(1., -1.),
vec2<f32>(-1., 1.),
vec2<f32>(-1., -1.),
);
@vertex
fn vs_main(@builtin(vertex_index) v_idx: u32) -> @builtin(position) vec4<f32> {
return vec4<f32>(v_positions[v_idx], 0., 0.);
}
@fragment
fn fs_main() -> @location(0) vec4<f32> {
return vec4<f32>(0.8, 0.2, 0.8, 1.);
}