瀏覽代碼

fix small issue with texOffset assigment.

value was Vector4 at first but I found out it would be unclear for and users, so I change to have two Vector2 instead, but forgot to assign offset .
pull/3621/head
devdad 2 年之前
父節點
當前提交
213f9f06f8
共有 1 個文件被更改,包括 6 次插入4 次删除
  1. +6
    -4
      examples/shaders/rpbr.h

+ 6
- 4
examples/shaders/rpbr.h 查看文件

@ -385,18 +385,20 @@ void PBRSetFloat(PBRMaterial *pbrMat, PBRFloatType pbrParamType, float value){
pbrMat->emissivePower = value;
SetShaderValue(pbrMat->pbrShader,pbrMat->emissivePowerLoc,&pbrMat->emissivePower,SHADER_UNIFORM_FLOAT);
break;
}}
}
}
void PBRSetVec2(PBRMaterial *pbrMat,PBRVec2Type type,Vector2 value){
pbrMat->texTiling[0] =value.x;
pbrMat->texTiling[1] =value.y;
switch(type){
case PBR_VEC2_TILING:
pbrMat->texTiling[0] = value.x;
pbrMat->texTiling[1] = value.y;
SetShaderValue(pbrMat->pbrShader,pbrMat->texTilingLoc,&pbrMat->texTiling,SHADER_UNIFORM_VEC2);
break;
case PBR_VEC2_OFFSET:
pbrMat->texOffset[0] = value.x;
pbrMat->texOffset[1] = value.y;
SetShaderValue(pbrMat->pbrShader,pbrMat->texOffsetLoc,&pbrMat->texOffset,SHADER_UNIFORM_VEC2);
break;
}

Loading…
取消
儲存