着色器贴图纹理中的一切都正常,但缩放(太大)。
坐标纹理:
mat4 bias = mat4(0.5,0.0,0.0,0.0,0.0,0.5,0.0,0.0,0.0,0.0,0.5,0.0,0.5,0.5,0.5,1.0);
ShadowCoord = bias * projMatrix * viewModelMatrix * vec4(position,1);
为什么在另一个例子中,textureMap坐标是:
ShadowCoord = bias * projMatrix * viewModelMatrix * ViewMatrixInverse;
另一个:
ShadowCoord = bias * projMatrix * viewModelMatrix * ModelMatrixRenderObject * vec4(position,1);
有人能解释这些差异吗?为什么我的纹理贴图会被缩放?