Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Is there a way to get OpenGL to do linear texture-mapping?



Hi Jonas...

You want to take a look at texture w coordinate to undo the effects of the perspective correction. You use the texture matrix together with eye-space texgen to set it up.

ATI has a paper detailing it: http://www.ati.com/developer/shaderx/ ShaderX_RipplingRefractiveAndReflectiveWater.pdf

For GooBall, we couldn't get their stuff to work, so we rolled our own (the paper was still well worth the read). The matrix we used ended up looking like this:

.5	 0	 0	 .5
 0 	-.5	0	.5
0	0	.5	.5
0	0	0	1

If you're using a rectangle texture, you wat to multiply the two upper rows with the texture dimensions.


On Mar 30, 2005, at 10:38 AM, jonas echterhoff wrote:

I'm looking for a way to get OpenGL to draw a texture with linear/affine mapping and not perspective correct. The reason is that i want to render a reflection of a part of my scene. This reflection is rendered to a texture, so it is already perspective correct. If I render this reflection texture using perspective-correct texture mapping it will end up looking distorted.

Any advice appreciated.

jonas

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Mac-opengl mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/mac-opengl/email@hidden

This email sent to email@hidden


Nicholas Francis
Director, www.otee.dk


_______________________________________________ Do not post admin requests to the list. They will be ignored. Mac-opengl mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/mac-opengl/email@hidden

This email sent to email@hidden
References: 
 >Is there a way to get OpenGL to do linear texture-mapping? (From: jonas echterhoff <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.