浏览代码

Update shaders_mesh_instancing.c

adding a missing  'locs[SHADER_LOC_MATRIX_MODEL] = GetShaderLocationAttrib(shader, "instanceTransform");'
pull/4689/head
MikiZX1 2 个月前
committed by GitHub
父节点
当前提交
21b5383a26
找不到此签名对应的密钥 GPG 密钥 ID: B5690EEEBB952194
共有 1 个文件被更改,包括 2 次插入1 次删除
  1. +2
    -1
      examples/shaders/shaders_mesh_instancing.c

+ 2
- 1
examples/shaders/shaders_mesh_instancing.c 查看文件

@ -73,7 +73,8 @@ int main(void)
// Get shader locations
shader.locs[SHADER_LOC_MATRIX_MVP] = GetShaderLocation(shader, "mvp");
shader.locs[SHADER_LOC_VECTOR_VIEW] = GetShaderLocation(shader, "viewPos");
shader.locs[SHADER_LOC_MATRIX_MODEL] = GetShaderLocationAttrib(shader, "instanceTransform");
// Set shader value: ambient light level
int ambientLoc = GetShaderLocation(shader, "ambient");
SetShaderValue(shader, ambientLoc, (float[4]){ 0.2f, 0.2f, 0.2f, 1.0f }, SHADER_UNIFORM_VEC4);

正在加载...
取消
保存