cg and vs ps

Started by
5 comments, last by SimmerD 18 years, 11 months ago
Hi, There are some problmes which confused me.Would you like to make me understand it clearly? 1) Cg is the topper level of vs and ps, so if we use cg, we must install directx or opengl? if we want to use shader 3.0, we must install the correct version directx which has vs 3.0 and ps3.0? 2)I have some codes written in fragment programme. Can i implement it using ps3.0? I am a newbie on cg. Would you like to help me? Thanks in advance. hanhan
Advertisement
1. Yes, it is C like. Microsofts HLSL is pretty much identical as well. Good tools to use are RenderMonkey (from ATI) and FX Composer (from NVidia). Visual Studio .net includes debugging support for HLSL.
2. Should be able to. Not many graphic cards around support ps3.0 though
------------------------See my games programming site at: www.toymaker.info
Quote:Original post by Trip99
1. Yes, it is C like. Microsofts HLSL is pretty much identical as well. Good tools to use are RenderMonkey (from ATI) and FX Composer (from NVidia). Visual Studio .net includes debugging support for HLSL.
2. Should be able to. Not many graphic cards around support ps3.0 though


Thanks very much!
In the fragment programme i have, there are codes which need the pixel position.
so if i want to run it on gpu, the card must supports shader model 3? ( that is to say it must support ps3.0?). Am i right?

Now i have a card ATI X600, i can not use it for above problem because it supports shader model 2.0??
The card must support ps3.0 if you want to use them.
ATI cards currently do not support shader model 3.0, the only cards that do are currenty NVidia GeForce 6800 models AFAIK.
GeForce 6600 also supports shader model 3.0

cheers
sam
Quote:Original post by izzo
GeForce 6600 also supports shader model 3.0

cheers
sam


if i want to do texture look up in vertex shader, my card must support vs3.0??
thanks!
You can use shader model 2, if you calculate the pixel position in the vertex shader and pass it down to the pixel shader in a texture coordinate. It's linear, so it comes down just fine.

Alternately, you can pass down clip space position in a texture coordinate instead.

This topic is closed to new replies.

Advertisement