Not logged in, Join Here! or Log In Below:  
 
News Articles Search    
 

 Home / 3D Theory & Graphics / fragment program & cube map (OpenGL) Account Manager
 
Archive Notice: This thread is old and no longer active. It is here for reference purposes. This thread was created on an older version of the flipcode forums, before the site closed in 2005. Please keep that in mind as you view this thread, as many of the topics and opinions may be outdated.
 
domino

May 07, 2005, 11:11 AM

Hi.
I've problem with sampling cube texture in fragment program, code:

!!ARBfp1.0
TEMP t0;
TEX t0, fragment.texcoord[0], texture[0], CUBE;
MOV result.color, t0;

END

I've no idea why object with cube map disappers after I add this fragment program - anyone know?. I'm sure that cube texcoords are on texture unit 0 becouse I save them in it in vertex program so I think that cube map is also in tex unit 0 (it works fine with vertex program only). Thans for every help.

 
dreddi

May 12, 2005, 05:37 AM

Hello,

First I would try to pass simple color in fragment program
to see if I get anything :)

!!ARBfp1.0
MOV result.color, { 1.0, 0.0, 0.0, 1.0 };
END

If you get a red object, we are home:)
I think your texture coordinates are generated so
when sampling the texture you should use:

TXP t0, fragment.texcoord[0], texture[0], CUBE;

Regards,
dReddi

 
This thread contains 2 messages.
 
 
Hosting by Solid Eight Studios, maker of PhotoTangler Collage Maker.