View Full Version : Cg projective & non projective texture query
10-17-2003, 06:12 AM
I have tried searching on google but to no vail, could any1 please tel me the difference between projective and non projective texture query.
Also, how does texRect work? using that I presume I can bind textures with width and height of not power 2.
Thanks for your help.
10-17-2003, 07:19 AM
It is all in the reference...
Nonprojective texture lookup queries a texture using (s, t, r) coordinates as they are passed to a fragment program.
Projective lookup uses (s/q, t/q, r/q) lookup(projective transform). This allows you to do some special tricks, like projection a texure http://www.opengl.org/discussion_boards/ubb/smile.gif
texRect is sampler for GL_TEXTURE_RECT_NV
10-17-2003, 07:35 AM
thanx a bunch..
I ws wondering another thing. I have to project a point into an image, whoses camera projection matrix I have. This point is then queried in texture.
On just multiplying, the projection matrix with point coordinates, I get negative coordinates for x and y, which is confusing me.Are these correct? if yes, then wuld just query with thses in texture give me the correct result that I want.
if not, then do i use gluProject() to get the coordinate to query. or is there any other way.
I have set the viewport to my texture size for gluProject function.
Thanks for help.
Powered by vBulletin® Version 4.2.2 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.