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.
1#import bevy_core_pipeline::fullscreen_vertex_shader::FullscreenVertexOutput
2#ifdef SRGB_TO_LINEAR
3#import bevy_render::color_operations::srgb_to_linear
4#endif
5#ifdef OKLAB_TO_LINEAR
6#import bevy_render::color_operations::oklab_to_linear_rgb
7#endif
9@group(0) @binding(0) var in_texture: texture_2d<f32>;
10@group(0) @binding(1) var in_sampler: sampler;
12@fragment
13fn fs_main(in: FullscreenVertexOutput) -> @location(0) vec4<f32> {
14 var color = textureSample(in_texture, in_sampler, in.uv);
15#ifdef SRGB_TO_LINEAR
16 color = vec4(srgb_to_linear(color.rgb), color.a);
17#endif
18#ifdef OKLAB_TO_LINEAR
19 color = vec4(oklab_to_linear_rgb(color.rgb), color.a);
20#endif
21 return color;
Contents