The open source OpenXR runtime
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

c/render: Fix handling of alpha channel in compute layer renderer

+3 -2
+3 -2
src/xrt/compositor/shaders/layer.comp
··· 249 249 // Unpremultipled blend factor of src.a. 250 250 accum.rgb = mix(accum.rgb, rgba.rgb, rgba.a); 251 251 } else { 252 - // Premultiplied bland foctor of 1. 252 + // Premultiplied blend factor of 1. 253 253 accum.rgb = (accum.rgb * (1 - rgba.a)) + rgba.rgb; 254 254 } 255 + accum.a = rgba.a + accum.a * (1.0 - rgba.a); 255 256 } 256 257 } 257 258 return accum; ··· 276 277 277 278 if (do_color_correction) { 278 279 // Do colour correction here since there are no automatic conversion in hardware available. 279 - colour = vec4(from_linear_to_srgb(colour.rgb), 1); 280 + colour.rgb = from_linear_to_srgb(colour.rgb); 280 281 } 281 282 282 283 imageStore(target, ivec2(offset.x + ix, offset.y + iy), colour);