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

Steve Lhomme robux4 at videolabs.io
Tue Mar 7 16:39:08 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 fb622865d6..79e3ff29b0 100644
--- a/modules/video_output/win32/direct3d11.c
+++ b/modules/video_output/win32/direct3d11.c
@@ -350,7 +350,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