glgsg: Force transform_weight column to read (0, 0, 0, 1) if absent

On NVIDIA cards, this doesn't seem to happen automatically.

Fixes #1207
This commit is contained in:
rdb 2022-01-01 16:49:41 +01:00
parent 500491e6c9
commit 2915c6e670

View File

@ -2591,6 +2591,11 @@ update_shader_vertex_arrays(ShaderContext *prev, bool force) {
_glgsg->_glVertexAttribI4ui != nullptr) {
_glgsg->_glVertexAttribI4ui(p, 0, 1, 2, 3);
}
else if (name == InternalName::get_transform_weight()) {
// NVIDIA doesn't seem to use to use these defaults by itself
static const GLfloat weights[4] = {0, 0, 0, 1};
_glgsg->_glVertexAttrib4fv(p, weights);
}
}
}