mirror of
https://github.com/ZDoom/qzdoom-gpl.git
synced 2024-11-27 14:12:28 +00:00
- fixed: The missing fourth component of the texture coordinate must be filled with 1.0, not 0.0 before applying the texture matrix. Not doing so will cancel out the translation part of the matrix.
This commit is contained in:
parent
fa3a62e954
commit
b96dd6c421
2 changed files with 5 additions and 5 deletions
|
@ -70,7 +70,7 @@
|
|||
// information
|
||||
//
|
||||
//==========================================================================
|
||||
|
||||
static float tics;
|
||||
void gl_SetPlaneTextureRotation(const GLSectorPlane * secplane, FMaterial * gltexture)
|
||||
{
|
||||
// only manipulate the texture matrix if needed.
|
||||
|
@ -80,8 +80,8 @@ void gl_SetPlaneTextureRotation(const GLSectorPlane * secplane, FMaterial * glte
|
|||
gltexture->TextureWidth() != 64 ||
|
||||
gltexture->TextureHeight() != 64)
|
||||
{
|
||||
float uoffs=FIXED2FLOAT(secplane->xoffs)/gltexture->TextureWidth();
|
||||
float voffs=FIXED2FLOAT(secplane->yoffs)/gltexture->TextureHeight();
|
||||
float uoffs = FIXED2FLOAT(secplane->xoffs) / gltexture->TextureWidth();
|
||||
float voffs = FIXED2FLOAT(secplane->yoffs) / gltexture->TextureHeight();
|
||||
|
||||
float xscale1=FIXED2FLOAT(secplane->xscale);
|
||||
float yscale1=FIXED2FLOAT(secplane->yscale);
|
||||
|
@ -328,7 +328,7 @@ void GLFlat::Draw(int pass, bool trans) // trans only has meaning for GLPASS_LIG
|
|||
int rel = getExtraLight();
|
||||
|
||||
#ifdef _DEBUG
|
||||
if (sector->sectornum == 2)
|
||||
if (sector->sectornum == 130)
|
||||
{
|
||||
int a = 0;
|
||||
}
|
||||
|
|
|
@ -39,7 +39,7 @@ void main()
|
|||
vec2 sst = vec2(r.x/m + 0.5, r.y/m + 0.5);
|
||||
vTexCoord.xy = sst;
|
||||
#else
|
||||
vTexCoord = TextureMatrix * vec4(aTexCoord, 0.0, 0.0);
|
||||
vTexCoord = TextureMatrix * vec4(aTexCoord, 0.0, 1.0);
|
||||
#endif
|
||||
|
||||
gl_Position = ProjectionMatrix * eyeCoordPos;
|
||||
|
|
Loading…
Reference in a new issue