[vlc-devel] [PATCH 4/4] direct3d11: simplify float4 to float3 conversion in the Pixel Shader

Steve Lhomme robux4 at videolabs.io
Mon Mar 6 16:09:25 CET 2017


---
 modules/video_output/win32/direct3d11.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/modules/video_output/win32/direct3d11.c b/modules/video_output/win32/direct3d11.c
index 425d314808..538b85d1e4 100644
--- a/modules/video_output/win32/direct3d11.c
+++ b/modules/video_output/win32/direct3d11.c
@@ -349,7 +349,7 @@ static const char* globPixelShaderDefault = "\
     rgba.a = sample.a * Opacity;\
     rgba = mul(rgba, Colorspace);\
     float opacity = rgba.a * Opacity;\
-    float3 rgb = float3(rgba.r, rgba.g, rgba.b);\
+    float3 rgb = (float3)rgba;\
     rgb = sourceToLinear(rgb);\
     rgb = toneMapping(rgb);\
     rgb = linearToDisplay(saturate(rgb));\
-- 
2.11.1



More information about the vlc-devel mailing list