tirbofish/dropbear · commit
8d20f7fdaf38f6a2589f0dcd49ef058e38f4284e
damn allat just for me having to return back to wgsl :( at least i did get **some** slang compat to work, but looks like wgsl is the way to go. merging to the ui branch to continue on with ui. i do have a neat little tool tho... Unverified
@@ -1,28 +0,0 @@ -struct VertexOutput { - @builtin(position) clip_position: vec4<f32>, - @location(0) uv: vec2<f32>, -} - -@group(0) @binding(0) -var tex: texture_2d<f32>; -@group(0) @binding(1) -var tex_sampler: sampler; - -@vertex -fn vs_main( - @builtin(vertex_index) in_vertex_index: u32, -) -> VertexOutput { - var out: VertexOutput; - - let x = f32((in_vertex_index << 1u) & 2u); - let y = f32(in_vertex_index & 2u); - out.clip_position = vec4<f32>(x * 2.0 - 1.0, y * 2.0 - 1.0, 0.0, 1.0); - out.uv = vec2<f32>(x, 1.0 - y); - return out; -} - -@fragment -fn fs_main(in: VertexOutput) -> @location(0) vec4<f32> { - let s = textureSample(tex, tex_sampler, in.uv); - return s; -} @@ -1,3 +1,8 @@ +struct Globals { + uint num_lights; + float ambient_strength; +}; + /// A standard light descriptor struct. struct Light { float4 position; @@ -16,6 +21,14 @@ struct CameraUniform { float4x4 view_proj;
Large diffs are not rendered by default. Showing the first 50 of 164 lines. Show full diff