examples: rename texture-light -> advanced-gen-texture-light
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
parent
417ec654df
commit
8d574e772c
4 changed files with 2 additions and 2 deletions
|
|
@ -1,35 +0,0 @@
|
|||
struct CameraUniform {
|
||||
view_pos: vec4<f32>,
|
||||
view_proj: mat4x4<f32>,
|
||||
};
|
||||
|
||||
struct VertexInput {
|
||||
@location(0) position: vec3<f32>,
|
||||
@location(1) normal: vec3<f32>,
|
||||
@location(2) tex_coords: vec2<f32>,
|
||||
};
|
||||
|
||||
struct VertexOutput {
|
||||
@builtin(position) clip_position: vec4<f32>,
|
||||
};
|
||||
|
||||
struct Light {
|
||||
position: vec4<f32>,
|
||||
color: vec4<f32>,
|
||||
};
|
||||
|
||||
@group(0) @binding(0) var<uniform> camera: CameraUniform;
|
||||
@group(1) @binding(0) var<uniform> light: Light;
|
||||
|
||||
@stage(vertex)
|
||||
fn vs_main(model: VertexInput) -> VertexOutput {
|
||||
var out: VertexOutput;
|
||||
let world_pos = vec4<f32>(model.position + light.position.xyz, 1.0);
|
||||
out.clip_position = camera.view_proj * world_pos;
|
||||
return out;
|
||||
}
|
||||
|
||||
@stage(fragment)
|
||||
fn fs_main(in: VertexOutput) -> @location(0) vec4<f32> {
|
||||
return vec4<f32>(1.0, 1.0, 1.0, 0.5);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue