Search across packages, versions, files, declarations, and comments. Use multiple terms to narrow results (AND), and add @vertex, @fragment, or @compute to filter by shader stage.
1import package::fullscreen_vertex_shader::FullscreenVertexOutput;
2@if(SRGB_TO_LINEAR) import bevy_render::color_operations::srgb_to_linear;
3@if(OKLAB_TO_LINEAR) import bevy_render::color_operations::oklab_to_linear_rgb;
5@group(0) @binding(0) var in_texture: texture_2d<f32>;
6@group(0) @binding(1) var in_sampler: sampler;
8@fragment
9fn fs_main(in: FullscreenVertexOutput) -> @location(0) vec4<f32> {
10 var color = textureSample(in_texture, in_sampler, in.uv);
11 @if(SRGB_TO_LINEAR)
12 color = vec4(srgb_to_linear(color.rgb), color.a);
13 @if(OKLAB_TO_LINEAR)
14 color = vec4(oklab_to_linear_rgb(color.rgb), color.a);
15 return color;
Contents