mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-14 00:55:20 +02:00
Fix texture matrix handling in our shaders
This commit is contained in:
@@ -249,7 +249,7 @@ public:
|
||||
m_world_view_proj.set(worldViewProj, services);
|
||||
|
||||
if (driver->getDriverType() == video::EDT_OGLES2 || driver->getDriverType() == video::EDT_OPENGL3) {
|
||||
core::matrix4 texture = driver->getTransform(video::ETS_TEXTURE_0);
|
||||
auto &texture = driver->getTransform(video::ETS_TEXTURE_0);
|
||||
m_world_view.set(worldView, services);
|
||||
m_texture.set(texture, services);
|
||||
}
|
||||
@@ -573,6 +573,7 @@ ShaderInfo ShaderSource::generateShader(const std::string &name,
|
||||
} else {
|
||||
shaders_header << "#version 100\n";
|
||||
}
|
||||
// cf. EVertexAttributes.h for the predefined ones
|
||||
vertex_header = R"(
|
||||
precision mediump float;
|
||||
|
||||
@@ -582,7 +583,7 @@ ShaderInfo ShaderSource::generateShader(const std::string &name,
|
||||
|
||||
attribute highp vec4 inVertexPosition;
|
||||
attribute lowp vec4 inVertexColor;
|
||||
attribute mediump vec4 inTexCoord0;
|
||||
attribute mediump vec2 inTexCoord0;
|
||||
attribute mediump vec3 inVertexNormal;
|
||||
attribute mediump vec4 inVertexTangent;
|
||||
attribute mediump vec4 inVertexBinormal;
|
||||
|
Reference in New Issue
Block a user