Hi,
I'm currently porting Descent
3 to Linux using Mesa as the OpenGL renderer. Using the same source code
as the Windows version except for the initialization and any other glx specific
things I have gotten it all ported. However, there seems to be some issues
with the perspective texture mapping. I'm not quite sure if this is on our
side, Mesa or maybe even glx (I'm using the NVidia glx X-Server for my TNT and
the one for Matrox for my g400), but remember that this is the same source code
as the Window's version. I've also talked to John Carmack at Id on how
they do their texture mapping coordinates for Quake (since Mesa and Quake get
along quite well). Where we are different is that Carmack uses OpenGL for
transformation and clipping, while we don't. I have found a hack of sort
which improves the texture mapping for D3, however, it still isn't
fixed.
It would be a great help to
me if I could get in contact with someone to maybe help work out these
problems. At the end of this email I have included the source code to how
we calculate our texture coordinates.
Thank you for your time,
Jeff Slutter
Outrage Entertainment
our texture map coordinate setup code: (done for
each vertex, pnt)
float
texw=1.0/(pnt->p3_z+Z_bias);
texp->s=pnt->p3_u*texw; texp->t=pnt->p3_v*texw; texp->r=0; texp->q=texw; My hack was to remove the *texw for the s and t
coordinates...that fixed 95% of the problem, however, any polygon clipped on the
screen suffered perspective issues.
|
- Re: [Mesa-dev] Mesa Perspective Texture mapping Jeff Slutter
- Re: [Mesa-dev] Mesa Perspective Texture mapping Keith Whitwell
- Re: [Mesa-dev] Mesa Perspective Texture mapping Jeff Slutter
- Re: [Mesa-dev] Mesa Perspective Texture mappi... Eero Pajarre
- Re: [Mesa-dev] Mesa Perspective Texture m... Jeff Slutter
- Re: [Mesa-dev] Mesa Perspective Text... Eero Pajarre
- Re: [Mesa-dev] Mesa Perspective Texture mappi... Stephen J Baker
- Re: [Mesa-dev] Mesa Perspective Texture m... Keith Whitwell
- RE: [Mesa-dev] Mesa Perspective Texture mapping Joe Waters
- Re: [Mesa-dev] Mesa Perspective Texture mapping Jeff Slutter
- Re: [Mesa-dev] Mesa Perspective Texture mapping Keith Whitwell