Page 1 of 1

Incorrect offsets/UVs with TEXTURES lump scaling

PostPosted: Sun Oct 28, 2018 1:34 am
by Talon1024
If I define textures to be scaled down in the TEXTURES lump, and offset them in a map, the offsets are applied incorrectly in the softplanar and OpenGL renderers. The softpoly renderer seems to work just fine for some reason.

Here's a runnable sample with high-res textures from cc0textures.com.


Re: Incorrect offsets/UVs with TEXTURES lump scaling

PostPosted: Wed Oct 31, 2018 6:00 pm
by Graf Zahl
This isn't a bug but an incompletely defined texture.

You have to add a 'worldpanning' instruction to each definition. The reason for this lies deep in the past. When texture scaling was originally implemented it was done with per texel panning, not world-unit panning. Needless to say that isn't the most useful thing, but when a decision had to be made what to use as default, the bad option was chosen.

In clear English: It's the softpoly renderer which is wrong here.