Remove GLES Normal matrix code

Co-Authored-By: Vitaliy <numzer0@yandex.ru>
master
Maksim 2022-03-06 11:38:33 +01:00
parent 79f889496c
commit d08c6f4af7
1 changed files with 0 additions and 15 deletions

View File

@ -230,8 +230,6 @@ class MainShaderConstantSetter : public IShaderConstantSetter
CachedVertexShaderSetting<float, 16> m_world_view;
// Texture matrix
CachedVertexShaderSetting<float, 16> m_texture;
// Normal matrix
CachedVertexShaderSetting<float, 9> m_normal;
#endif
public:
@ -241,7 +239,6 @@ public:
#if ENABLE_GLES
, m_world_view("mWorldView")
, m_texture("mTexture")
, m_normal("mNormal")
#endif
{}
~MainShaderConstantSetter() = default;
@ -269,16 +266,6 @@ public:
core::matrix4 texture = driver->getTransform(video::ETS_TEXTURE_0);
m_world_view.set(*reinterpret_cast<float(*)[16]>(worldView.pointer()), services);
m_texture.set(*reinterpret_cast<float(*)[16]>(texture.pointer()), services);
core::matrix4 normal;
worldView.getTransposed(normal);
sanity_check(normal.makeInverse());
float m[9] = {
normal[0], normal[1], normal[2],
normal[4], normal[5], normal[6],
normal[8], normal[9], normal[10],
};
m_normal.set(m, services);
#endif
}
};
@ -584,7 +571,6 @@ ShaderInfo ShaderSource::generateShader(const std::string &name,
uniform highp mat4 mWorldView;
uniform highp mat4 mWorldViewProj;
uniform mediump mat4 mTexture;
uniform mediump mat3 mNormal;
attribute highp vec4 inVertexPosition;
attribute lowp vec4 inVertexColor;
@ -607,7 +593,6 @@ ShaderInfo ShaderSource::generateShader(const std::string &name,
#define mWorldView gl_ModelViewMatrix
#define mWorldViewProj gl_ModelViewProjectionMatrix
#define mTexture (gl_TextureMatrix[0])
#define mNormal gl_NormalMatrix
#define inVertexPosition gl_Vertex
#define inVertexColor gl_Color