From ad18458ddfe828fe8b693edcdc8644e51a16059a Mon Sep 17 00:00:00 2001 From: halx99 Date: Fri, 7 Jul 2023 04:05:56 +0800 Subject: [PATCH] For bot happy --- core/renderer/Shaders.h | 6 +++--- core/renderer/shaders/videoTexture.frag | 13 ++++++------- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/core/renderer/Shaders.h b/core/renderer/Shaders.h index fe6a453cd0..0b18633654 100644 --- a/core/renderer/Shaders.h +++ b/core/renderer/Shaders.h @@ -88,9 +88,9 @@ extern AX_DLL const char* CC2D_quadColor_vert; extern AX_DLL const char* hsv_frag; extern AX_DLL const char* dualSampler_hsv_frag; -extern AX_DLL const std::string_view videoTextureYUY2_frag; -extern AX_DLL const std::string_view videoTextureNV12_frag; -extern AX_DLL const std::string_view videoTextureBGRA_frag; +extern AX_DLL const char* videoTextureYUY2_frag; +extern AX_DLL const char* videoTextureNV12_frag; +extern AX_DLL const char* videoTextureBGRA_frag; NS_AX_END /** end of support group diff --git a/core/renderer/shaders/videoTexture.frag b/core/renderer/shaders/videoTexture.frag index a3cc456403..4b39e4c4e4 100644 --- a/core/renderer/shaders/videoTexture.frag +++ b/core/renderer/shaders/videoTexture.frag @@ -1,4 +1,3 @@ -#include /* mat4 to mat3: mat3 coeff = mat3( @@ -16,7 +15,7 @@ mat3 coeff = mat3(colorTransform); // require GLES3 // refer to: // https://docs.microsoft.com/en-us/windows/win32/medfound/recommended-8-bit-yuv-formats-for-video-rendering#yuy2 -const std::string_view videoTextureYUY2_frag = R"( +const char* videoTextureYUY2_frag = R"( #ifdef GL_ES varying lowp vec4 v_fragmentColor; @@ -55,7 +54,7 @@ void main() gl_FragColor = v_fragmentColor * OutColor; } -)"sv; +)"; /* The NV12 pixel format render shader: @@ -75,7 +74,7 @@ refer to: - https://docs.microsoft.com/en-us/windows/win32/medfound/recommended-8-bit-yuv-formats-for-video-rendering#nv12 - https://github.com/doyoulikerock/D3D11NV12Rendering/blob/master/D3D11NV12Rendering/PixelShader.hlsl */ -const std::string_view videoTextureNV12_frag = R"( +const char* videoTextureNV12_frag = R"( #ifdef GL_ES varying lowp vec4 v_fragmentColor; @@ -113,9 +112,9 @@ void main() gl_FragColor = v_fragmentColor * OutColor; } -)"sv; +)"; -const std::string_view videoTextureBGRA_frag = R"( +const char* videoTextureBGRA_frag = R"( #ifdef GL_ES varying lowp vec4 v_fragmentColor; varying mediump vec2 v_texCoord; @@ -130,4 +129,4 @@ void main() { gl_FragColor = v_fragmentColor * texture2D(u_tex0, v_texCoord).bgra; } -)"sv; +)";