1#import bevy_pbr::pbr_deferred_types::unpack_24bit_normal 2#import bevy_pbr::utils::octahedral_decode 3#import bevy_render::view::View 5@group(1) @binding(7) var gbuffer: texture_2d<u32>; 6@group(1) @binding(12) var<uniform> view: View; 8@group(2) @binding(0) var diffuse_albedo: texture_storage_2d<rgba8unorm, write>; 9@group(2) @binding(1) var specular_albedo: texture_storage_2d<rgba8unorm, write>; 10@group(2) @binding(2) var normal_roughness: texture_storage_2d<rgba16float, write>; 11@group(2) @binding(3) var specular_motion_vectors: texture_storage_2d<rg16float, write>; 13@compute @workgroup_size(8, 8, 1) 14fn resolve_dlss_rr_textures(@builtin(global_invocation_id) global_id: vec3<u32>) { 15 let pixel_id = global_id.xy; 16 if any(pixel_id >= vec2u(view.main_pass_viewport.zw)) { return; } 18 let gpixel = textureLoad(gbuffer, pixel_id, 0); 19 let base_rough = unpack4x8unorm(gpixel.r); 20 let base_color = pow(base_rough.rgb, vec3(2.2)); 21 let world_normal = octahedral_decode(unpack_24bit_normal(gpixel.a)); 22 let perceptual_roughness = base_rough.a; 24 textureStore(diffuse_albedo, pixel_id, vec4(base_color, 0.0)); 25 textureStore(specular_albedo, pixel_id, vec4(0.0)); 26 textureStore(normal_roughness, pixel_id, vec4(world_normal, perceptual_roughness)); 27 textureStore(specular_motion_vectors, pixel_id, vec4(0.0));