Gamestudio Links
Zorro Links
Newest Posts
New FXCM FIX Plugin
by flink. 06/04/24 07:30
AlpacaZorroPlugin v1.3.0 Released
by kzhao. 05/22/24 13:41
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
Change chart colours
by 7th_zorro. 05/11/24 09:25
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (AndrewAMD, flink), 747 guests, and 6 spiders.
Key: Admin, Global Mod, Mod
Newest Members
AemStones, LucasJoshua, Baklazhan, Hanky27, firatv
19056 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Cg and .fx files? #19593
11/08/03 12:28
11/08/03 12:28
Joined: Jul 2002
Posts: 2,813
U.S.
Nadester Offline OP

Expert
Nadester  Offline OP

Expert

Joined: Jul 2002
Posts: 2,813
U.S.
Say I have a shader written in Cg (which I do). How do I convert it into a .fx that would be compatable with 3dgs?


--Eric
Re: Cg and .fx files? [Re: Nadester] #19594
11/08/03 15:20
11/08/03 15:20
Joined: Jan 2002
Posts: 1,276
trapped in a paper bag
Drew Offline
Serious User
Drew  Offline
Serious User

Joined: Jan 2002
Posts: 1,276
trapped in a paper bag
There was talk about it here... I would love to know if there is a process or if you really need to know programming. I would love to convert any shader type to GS...like from RenderMonkey, CG, ATI demos...
Ventilator converted the ATI grass demo, I would love to know how
If you figure it out, please share!

CG to shader thread


Drew Medina
Game Developer (Artist)
Personal & professional website
Deviant Art
My Blogspot
Re: Cg and .fx files? [Re: Nadester] #19595
11/08/03 16:21
11/08/03 16:21
Joined: May 2002
Posts: 7,441
ventilator Offline
Senior Expert
ventilator  Offline
Senior Expert

Joined: May 2002
Posts: 7,441
from what i have seen, nvidias cgtoolkit seems to be tailored for opengl? (just a guess, i only took a quick look at all the nice example effects...) i assume if you compile a cg shader to assembler you just have to create an .fx file manually which sets up all the matrices and constants so that they fit to the generated assembler parts. but i have never tried that...

i prefer trying to understand what the shader does and rewriting it for a6 from scratch. but i didn't have much success so far! i am still quite a beginner...

what i did with the ati grass shader:

for the pixelshader part i simply took this shader i already had. it's great for all kinds of vegetation. it's the first shader i ever did (it's very simple. basically it's just the cnd line! ).

the ati shaders don't use .fx files. i simply took the vertex assembler part and then i created an effect string which sets up all the matrices and constants correctly. some adaptations were necessary because vecTime is a little different to the time the ati shader uses. the animation was much too fast. additionally i added fog because i think every shader should react to the fog settings of the level.

Re: Cg and .fx files? [Re: ventilator] #19596
11/09/03 01:25
11/09/03 01:25
Joined: Jul 2002
Posts: 2,813
U.S.
Nadester Offline OP

Expert
Nadester  Offline OP

Expert

Joined: Jul 2002
Posts: 2,813
U.S.
So how would I compile Cg into asm? All that I have seen so far is Cg compiling at runtime. (which isn't very useful to us 3dgs users) I need to compile it stand alone and get the assembly. (Which I think I can just copy into a text file and name it *.fx, right?)


--Eric
Re: Cg and .fx files? [Re: Nadester] #19597
11/09/03 02:12
11/09/03 02:12
Joined: May 2002
Posts: 7,441
ventilator Offline
Senior Expert
ventilator  Offline
Senior Expert

Joined: May 2002
Posts: 7,441
there is this cgc.exe command line tool. i guess this is the compiler. run it with cgc -help ...

Quote:

Which I think I can just copy into a text file and name it *.fx, right?



probably it just creates the assembler! a .fx file is more than assembler. look at the examples here on this forum...


Moderated by  Blink, Hummel, Superku 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1