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 .
This commit is contained in:
parent
ed075ce357
commit
213f9f06f8
|
|
@ -385,18 +385,20 @@ void PBRSetFloat(PBRMaterial *pbrMat, PBRFloatType pbrParamType, float value){
|
||||||
pbrMat->emissivePower = value;
|
pbrMat->emissivePower = value;
|
||||||
SetShaderValue(pbrMat->pbrShader,pbrMat->emissivePowerLoc,&pbrMat->emissivePower,SHADER_UNIFORM_FLOAT);
|
SetShaderValue(pbrMat->pbrShader,pbrMat->emissivePowerLoc,&pbrMat->emissivePower,SHADER_UNIFORM_FLOAT);
|
||||||
break;
|
break;
|
||||||
}}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void PBRSetVec2(PBRMaterial *pbrMat,PBRVec2Type type,Vector2 value){
|
void PBRSetVec2(PBRMaterial *pbrMat,PBRVec2Type type,Vector2 value){
|
||||||
pbrMat->texTiling[0] =value.x;
|
|
||||||
pbrMat->texTiling[1] =value.y;
|
|
||||||
switch(type){
|
switch(type){
|
||||||
case PBR_VEC2_TILING:
|
case PBR_VEC2_TILING:
|
||||||
|
pbrMat->texTiling[0] = value.x;
|
||||||
|
pbrMat->texTiling[1] = value.y;
|
||||||
SetShaderValue(pbrMat->pbrShader,pbrMat->texTilingLoc,&pbrMat->texTiling,SHADER_UNIFORM_VEC2);
|
SetShaderValue(pbrMat->pbrShader,pbrMat->texTilingLoc,&pbrMat->texTiling,SHADER_UNIFORM_VEC2);
|
||||||
break;
|
break;
|
||||||
case PBR_VEC2_OFFSET:
|
case PBR_VEC2_OFFSET:
|
||||||
|
pbrMat->texOffset[0] = value.x;
|
||||||
|
pbrMat->texOffset[1] = value.y;
|
||||||
SetShaderValue(pbrMat->pbrShader,pbrMat->texOffsetLoc,&pbrMat->texOffset,SHADER_UNIFORM_VEC2);
|
SetShaderValue(pbrMat->pbrShader,pbrMat->texOffsetLoc,&pbrMat->texOffset,SHADER_UNIFORM_VEC2);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user