Fix #14564 ImmediateGeometry normals act strangely compared to SurfaceTool
This commit is contained in:
parent
c68b031b05
commit
08c8d46593
|
@ -1557,7 +1557,7 @@ void RasterizerSceneGLES3::_render_geometry(RenderList::Element *e) {
|
|||
|
||||
glEnableVertexAttribArray(VS::ARRAY_NORMAL);
|
||||
glBufferSubData(GL_ARRAY_BUFFER, buf_ofs, sizeof(Vector3) * vertices, c.normals.ptr());
|
||||
glVertexAttribPointer(VS::ARRAY_NORMAL, 3, GL_FLOAT, false, sizeof(Vector3) * vertices, ((uint8_t *)NULL) + buf_ofs);
|
||||
glVertexAttribPointer(VS::ARRAY_NORMAL, 3, GL_FLOAT, false, sizeof(Vector3), ((uint8_t *)NULL) + buf_ofs);
|
||||
buf_ofs += sizeof(Vector3) * vertices;
|
||||
|
||||
} else {
|
||||
|
@ -1569,7 +1569,7 @@ void RasterizerSceneGLES3::_render_geometry(RenderList::Element *e) {
|
|||
|
||||
glEnableVertexAttribArray(VS::ARRAY_TANGENT);
|
||||
glBufferSubData(GL_ARRAY_BUFFER, buf_ofs, sizeof(Plane) * vertices, c.tangents.ptr());
|
||||
glVertexAttribPointer(VS::ARRAY_TANGENT, 4, GL_FLOAT, false, sizeof(Plane) * vertices, ((uint8_t *)NULL) + buf_ofs);
|
||||
glVertexAttribPointer(VS::ARRAY_TANGENT, 4, GL_FLOAT, false, sizeof(Plane), ((uint8_t *)NULL) + buf_ofs);
|
||||
buf_ofs += sizeof(Plane) * vertices;
|
||||
|
||||
} else {
|
||||
|
|
Loading…
Reference in New Issue