[vlc-commits] direct3d11: simplify float4 to float3 conversion in the Pixel Shader

Steve Lhomme git at videolan.org
Fri Mar 10 19:40:44 CET 2017


vlc | branch: master | Steve Lhomme <robUx4 at videolabs.io> | Tue Mar  7 16:39:08 2017 +0100| [2f2a31c0d4e6ed265d1bae6fdf3abbd75e55a08f] | committer: Jean-Baptiste Kempf

direct3d11: simplify float4 to float3 conversion in the Pixel Shader

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=2f2a31c0d4e6ed265d1bae6fdf3abbd75e55a08f
---

 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 fb62286..79e3ff2 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));\



More information about the vlc-commits mailing list