summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Herzog <thomas.herzog@mail.com>2018-08-08 22:17:51 +0200
committerGitHub <noreply@github.com>2018-08-08 22:17:51 +0200
commit77e38f9ddfd9825a73f604553860963fdeee5df5 (patch)
tree0080ba07773c329ffff2071dc4f7d63547ae4c43
parent1800664e803c1f9bd10d4ff5dad94be6b2166520 (diff)
parenta0afaaeeb9c130bf10bc6c196b463dae4aecba84 (diff)
Merge pull request #20819 from dragmz/unhack-gles2-unhack
Fix mat4 uniform writes
-rw-r--r--drivers/gles2/shader_gles2.cpp30
1 files changed, 15 insertions, 15 deletions
diff --git a/drivers/gles2/shader_gles2.cpp b/drivers/gles2/shader_gles2.cpp
index 08ace2a9af..e9b58cb272 100644
--- a/drivers/gles2/shader_gles2.cpp
+++ b/drivers/gles2/shader_gles2.cpp
@@ -950,21 +950,21 @@ void ShaderGLES2::use_material(void *p_material) {
}
value.second.write[0].real = val.basis.elements[0][0];
- value.second.write[0].real = val.basis.elements[0][1];
- value.second.write[0].real = val.basis.elements[0][2];
- value.second.write[0].real = 0;
- value.second.write[0].real = val.basis.elements[1][0];
- value.second.write[0].real = val.basis.elements[1][1];
- value.second.write[0].real = val.basis.elements[1][2];
- value.second.write[0].real = 0;
- value.second.write[0].real = val.basis.elements[2][0];
- value.second.write[0].real = val.basis.elements[2][1];
- value.second.write[0].real = val.basis.elements[2][2];
- value.second.write[0].real = 0;
- value.second.write[0].real = val.origin[0];
- value.second.write[0].real = val.origin[1];
- value.second.write[0].real = val.origin[2];
- value.second.write[0].real = 1;
+ value.second.write[1].real = val.basis.elements[0][1];
+ value.second.write[2].real = val.basis.elements[0][2];
+ value.second.write[3].real = 0;
+ value.second.write[4].real = val.basis.elements[1][0];
+ value.second.write[5].real = val.basis.elements[1][1];
+ value.second.write[6].real = val.basis.elements[1][2];
+ value.second.write[7].real = 0;
+ value.second.write[8].real = val.basis.elements[2][0];
+ value.second.write[9].real = val.basis.elements[2][1];
+ value.second.write[10].real = val.basis.elements[2][2];
+ value.second.write[11].real = 0;
+ value.second.write[12].real = val.origin[0];
+ value.second.write[13].real = val.origin[1];
+ value.second.write[14].real = val.origin[2];
+ value.second.write[15].real = 1;
} break;
case ShaderLanguage::TYPE_SAMPLER2D: {