testgpurender_effects: use the grayscale algorithm from BT.709

This commit is contained in:
Sam Lantinga
2025-09-26 10:27:10 -07:00
parent 1f73c19a73
commit 1d2a482dde
9 changed files with 555 additions and 554 deletions

View File

@@ -13,7 +13,7 @@ struct PSOutput {
PSOutput main(PSInput input) {
PSOutput output;
float4 color = u_texture.Sample(u_sampler, input.v_uv) * input.v_color;
float gray = color.r * 0.299 + color.g * 0.587 + color.r * 0.114;
float gray = color.r * 0.2126 + color.g * 0.7152 + color.r * 0.722;
output.o_color = float4(gray, gray, gray, color.a);
return output;
}