From 5209758d61e39b063938c66b2bc8c2fcc28608fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=91=D1=80=D0=B0=D0=BD=D0=B8=D0=BC=D0=B8=D1=80=20=D0=9A?= =?UTF-8?q?=D0=B0=D1=80=D0=B0=D1=9F=D0=B8=D1=9B?= Date: Fri, 19 Jul 2019 21:36:49 -0700 Subject: [PATCH] Cleanup. --- src/bgfx_shader.sh | 41 ++++++----------------------------------- 1 file changed, 6 insertions(+), 35 deletions(-) diff --git a/src/bgfx_shader.sh b/src/bgfx_shader.sh index d2641968d..46b512e5d 100644 --- a/src/bgfx_shader.sh +++ b/src/bgfx_shader.sh @@ -570,59 +570,30 @@ uvec4 uvec4_splat(uint _x) { return uvec4(_x, _x, _x, _x); } mat4 mtxFromRows(vec4 _0, vec4 _1, vec4 _2, vec4 _3) { #if BGFX_SHADER_LANGUAGE_GLSL - return transpose(mat4(_0, _1, _2, _3) ); + return transpose(mat4(_0, _1, _2, _3) ); #else - return mat4(_0, _1, _2, _3); + return mat4(_0, _1, _2, _3); #endif // BGFX_SHADER_LANGUAGE_GLSL } mat4 mtxFromCols(vec4 _0, vec4 _1, vec4 _2, vec4 _3) { #if BGFX_SHADER_LANGUAGE_GLSL - return mat4(_0, _1, _2, _3); + return mat4(_0, _1, _2, _3); #else - return transpose(mat4(_0, _1, _2, _3) ); + return transpose(mat4(_0, _1, _2, _3) ); #endif // BGFX_SHADER_LANGUAGE_GLSL } mat3 mtxFromCols(vec3 _0, vec3 _1, vec3 _2) { #if BGFX_SHADER_LANGUAGE_GLSL - return mat3(_0, _1, _2); + return mat3(_0, _1, _2); #else - return transpose(mat3(_0, _1, _2) ); + return transpose(mat3(_0, _1, _2) ); #endif // BGFX_SHADER_LANGUAGE_GLSL } -vec4 mtxGetRow(mat4 _0, uint row) -{ -#if BGFX_SHADER_LANGUAGE_GLSL - return vec4(_0[0][row], _0[1][row], _0[2][row], _0[3][row]); -#else - return vec4(_0[row]); -#endif // BGFX_SHADER_LANGUAGE_GLSL -} - -vec4 mtxGetColumn(mat4 _0, uint column) -{ -#if BGFX_SHADER_LANGUAGE_GLSL - return vec4(_0[column]); -#else - return vec4(_0[0][column], _0[1][column], _0[2][column], _0[3][column]); -#endif // BGFX_SHADER_LANGUAGE_GLSL -} - -float mtxGetElement(mat4 _0, uint column, uint row) -{ -#if BGFX_SHADER_LANGUAGE_GLSL - return _0[column][row]; -#else - return _0[row][column]; -#endif // BGFX_SHADER_LANGUAGE_GLSL -} - - - uniform vec4 u_viewRect; uniform vec4 u_viewTexel; uniform mat4 u_view;