r1425 (+older) camera textures placed on floors are flipped

Bugs that have been resolved.

Moderator: Graf Zahl

Locked
User avatar
Enjay
Developer
Developer
Posts: 4748
Joined: Tue Aug 30, 2005 23:19
Location: Scotland
Contact:

r1425 (+older) camera textures placed on floors are flipped

Post by Enjay »

Reference this thread at ZDoom:

http://forum.zdoom.org/viewtopic.php?f=19&t=22336

The mod can be obtained there. Or direct idgames link:
http://www.doomworld.com/idgames/?id=16830


My post:

[spoiler]
Enjay wrote:Now here's an odd thing that I can't see already mentioned: if I play a score game in ZDoom the score card is correct, if I play in GZDoom it is mirrored.

ZDoom
Image

GZDoom
Image

:?:
[/spoiler]

Isle's reply:
Isle wrote:
Enjay wrote:Now here's an odd thing that I can't see already mentioned: if I play a score game in ZDoom the score card is correct, if I play in GZDoom it is mirrored.
after some quick tests it appears to be gzdoom's fault. it's flipping camera textures placed on the floor.
User avatar
Graf Zahl
GZDoom Developer
GZDoom Developer
Posts: 7148
Joined: Wed Jul 20, 2005 9:48
Location: Germany
Contact:

Re: r1425 (+older) camera textures placed on floors are flip

Post by Graf Zahl »

Damnit!

Camera textures are generated upside down but the wall code contains some compensation for that. The flat code doesn't.
User avatar
Gez
Developer
Developer
Posts: 1399
Joined: Mon Oct 22, 2007 16:47

Re: r1425 (+older) camera textures placed on floors are flip

Post by Gez »

And is it any hard to fix? On a whim, I added this to gl_SetPlaneTextureRotation() for a test, and the result is that it actually worked for the normal render.

Code: Select all

		float xscale1=FIXED2FLOAT(secplane->xscale);
		float yscale1=FIXED2FLOAT(secplane->yscale);
+		if (gltexture->tex->bHasCanvas)
+		{
+			yscale1 = 0 - yscale1;
+		}
I'm not committing that change though, at least not without further input. Also, it doesn't affect the textured automap, which is still mirrored even with that change.
Lars
Posts: 9
Joined: Wed Jul 11, 2012 21:59

Re: r1425 (+older) camera textures placed on floors are flip

Post by Lars »

Is there a possibility that the fix breaks anything else? If not, go ahead and commit it. It is surely an enhancement over the current behaviour. (Rats Solitaire is a nice little gem, by the way... :) )

That said, perhaps there is another part in the code where the fix could be applied, so that the automap texture is corrected as well?
Edward-san
Developer
Developer
Posts: 197
Joined: Sun Nov 29, 2009 16:36

Re: r1425 (+older) camera textures placed on floors are flip

Post by Edward-san »

is that the only place where that part of code should be applied? sounds like a hack for me. just my 0.02€
User avatar
Gez
Developer
Developer
Posts: 1399
Joined: Mon Oct 22, 2007 16:47

Re: r1425 (+older) camera textures placed on floors are flip

Post by Gez »

You've got a weird definition of hack. It makes sense that when you draw one type of thing, there is only one place in the code where it is drawn, so any adjustment you may have to do to it can be on only one place upstream in the pipeline.

Though in this case, such code would also need to be applied wherever it is that the OpenGL automap is rendered.
User avatar
Graf Zahl
GZDoom Developer
GZDoom Developer
Posts: 7148
Joined: Wed Jul 20, 2005 9:48
Location: Germany
Contact:

Re: r1425 (+older) camera textures placed on floors are flip

Post by Graf Zahl »

The change is perfectly fine. For the automap it needs to be added to FGLRenderer::FillSimplePoly which rotates the coordinates on the fly.
User avatar
Gez
Developer
Developer
Posts: 1399
Joined: Mon Oct 22, 2007 16:47

Re: r1425 (+older) camera textures placed on floors are flip

Post by Gez »

Okay, then it's fixed.
Locked

Return to “Closed Bugs”