From 213f9f06f83ca7a5aaf39014c5fecab2d2c98e7e Mon Sep 17 00:00:00 2001 From: devdad Date: Mon, 11 Dec 2023 17:54:00 +0100 Subject: [PATCH] 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 . --- examples/shaders/rpbr.h | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/examples/shaders/rpbr.h b/examples/shaders/rpbr.h index dfa4ac973..63d8479af 100644 --- a/examples/shaders/rpbr.h +++ b/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; }