outfly/assets/shaders/skybox.wgsl
2024-04-21 19:28:29 +02:00

13 lines
386 B
WebGPU Shading Language

// NOTE: This is currently not being used
#import bevy_pbr::{
mesh_view_bindings::globals,
forward_io::VertexOutput,
}
@fragment
fn fragment(in: VertexOutput) -> @location(0) vec4<f32> {
let pos: vec2<f32> = 10 * floor(3500 * in.uv);
let brightness: vec3<f32> = vec3(max((fract(dot(sin(pos),pos)) - 0.995) * 90.0, 0.0));
return vec4<f32>(0.01 * brightness, 1.0);
}