home home

downloads files

forum forum

docs docs

wiki wiki

faq faq

Cube & Cube 2 FORUM


1-dimensional textures on x86 Linux / Radeon

by Owl on 03/11/2006 08:43, 14 messages, last message: 03/23/2006 19:32, 1272 views, last view: 04/29/2024 14:33

Hi there!

I am getting some strange behaviour from the textures in Sauerbraten on my x86 Linux box with Radeon graphics.

Take a look at this screenshot - http://owl.me.uk/stuff/screenshots/screen100306.png

As you can see, the textures look fine when they are oriented a certain way, but the floors and walls oriented a different way come out looking 1-dimensional, like they've been rotated 90 degrees or something.

I have the same problem in EDM (which is derived from Sauer) but not in Cube.

Has anyone come across this or can suggest what I should do to fix it?

I'm using the precompiled x86 Sauerbraten binaries on a Debian unstable machine, with all the latest Debian versions of X.org, Mesa, SDL etc.

   Board Index   

#1: nvidia

by torg on 03/11/2006 11:45

this is the Nvidia bug

I compile SVG, and no bug.

pleare try this.

Danke

reply to this message

#2: ..

by Owl on 03/11/2006 13:10

Do you have a link to more information about the "Nvidia bug"?

Do you mean it's a bug that occurs when one is not using an Nvidia card?

What do you mean by "compile SVG"? Is that some kind of build option?

Thanks for your help so far!

reply to this message

#3: Re: ..

by kurtis84 on 03/12/2006 15:18, refers to #2

If you have an nvidia card, this is caused by a driver bug of some sort. Only workaround is to roll back to driver version 78.01 or older. If you have some other video card...please post the information.

reply to this message

#4: ..

by Owl on 03/12/2006 16:08

I don't have an Nvidia card. I have a Radeon (as I said in my initial post).

It's a Radeon 9200 SE, and it's using the default Radeon drivers that come with linux kernel 2.6.14 and X.org 6.9.0.

What other information would you like to see?

I haven't ever experienced this problem in any other OpenGL/SDL game, including Cube.

reply to this message

#5: Re: ..

by Aardappel_ on 03/13/2006 06:41, refers to #3

I may have an idea for a workaround (since nvidia seems not to care about my bugreport, even after I am now an official developer to them).

Altenatively I may rewrite the texture projection using shaders, which means that for everyone using 8x.xx that has a dx9 compatible card, the problem would also be solved. Hopefully that includes the majority.

reply to this message

#6: Re: ..

by Passa on 03/13/2006 08:50, refers to #5

this would lower performance though wouldent it..

also, does this mean people with say a geforce 2 mx using the latest 8 series forcewares cannot play sauerbraten? or even a geforce 4 ti (as it only supports dx8) if you make this change?

reply to this message

#7: Re: ..

by Aardappel_ on 03/13/2006 10:17, refers to #6

no, it would probably increase performance.

and no, people with a geforce 2 and forceware 8x.xx would have to wait till nvidia fixes their bugs, or downgrade, or buy a new card.

reply to this message

#8: same bug

by undefined on 03/13/2006 18:47

I have same bug with ATI Radeon 9250 and
xorg 7.0. It could be possible to decrease
level of details. My framerate often goes to
20 fps.

reply to this message

#9: ..

by Owl on 03/19/2006 22:30

OK, I don't know any C at all, but I was reading the OpenGL docs and I tried messing around with some things. Applying the following patch to engine/rendergl.cpp seems to have fixed it!

--- engine/rendergl.cpp.bak 2006-03-19 20:15:36.847388657 +0000
+++ engine/rendergl.cpp 2006-03-19 20:24:12.372807791 +0000
@@ -348,11 +348,13 @@
glTexGeni(GL_T, GL_TEXTURE_GEN_MODE, GL_OBJECT_LINEAR);
glEnable(GL_TEXTURE_GEN_S);
glEnable(GL_TEXTURE_GEN_T);
+ glEnable(GL_TEXTURE_GEN_R);

renderq(w, h);

glDisable(GL_TEXTURE_GEN_S);
glDisable(GL_TEXTURE_GEN_T);
+ glDisable(GL_TEXTURE_GEN_R);

glTexEnvf(GL_TEXTURE_ENV, GL_RGB_SCALE_EXT, 1.0f);

reply to this message

#10: Re: ..

by Aardappel_ on 03/20/2006 02:44, refers to #9

interesting... the Z tex coord is never used, so I wonder how this can fix it.. sounds like a sideeffect.

reply to this message

#11: Re: ..

by Aardappel_ on 03/20/2006 03:02, refers to #10

also, turning R on costs 1 extra dotproduct, so I wouldn't wanna do it without reason.

reply to this message

#12: Re: ..

by Aardappel_ on 03/20/2006 06:03, refers to #11

I have put the R coord in the code for now, see if that helps people.

reply to this message

#13: ..

by Owl on 03/20/2006 08:23

As the textures are fine in one plane without the R coord turned on, I'm guessing the Radeon/Nvidia driver uses the R coord when rendering textures that are rotated to angles other than that plane.

I'm guessing there's a better option you can set - certainly my frame rate is much poorer in this hacked Sauerbraten than it is in Cube on the same machine. But it'll do for now.

reply to this message

#14: ..

by Owl on 03/23/2006 19:32

Wheee, thanks for including this patch in 2006-03-20 !

reply to this message

   Board Index   


Unvalidated accounts can only reply to the 'Permanent Threads' section!


content by Aardappel & eihrul © 2001-2024
website by SleepwalkR © 2001-2024
53865411 visitors requested 71640557 pages
page created in 0.016 seconds using 10 queries
hosted by Boost Digital