|
|
|
Help!
by VoroneTZ. 10/14/25 05:04
|
|
|
|
|
|
2 registered members (Grant, joenxxx),
9,921
guests, and 0
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
Re: .FX and Shaders, How To?
[Re: indiGLOW]
#23201
02/12/04 06:53
02/12/04 06:53
|
Joined: Oct 2003
Posts: 1,258 Virginia, USA
qwerty823
Senior Developer
|
Senior Developer
Joined: Oct 2003
Posts: 1,258
Virginia, USA
|
Quote:
I have recently got a hold of ATI's RenderMonkey program and have looked at some shader systems they have implemented. After reading many of the posts here, Ventilators comments especially, I am still a little confused about two key areas. First I would like to say I understand very little of the shader coding at the moment, but I am working on that... 
------------------------------------------------------
First Area ======== I would like to use .fx files for all my shader stuff, but I am having difficulty moving some of them over to .fx, (this has a lot to do with the Second question, below), as some variables defined above the usual effect="......" dont like being at the top of the .fx file. Also am I right in thinking that there is no way to pack the .fx file into the build when you create a resource, i.e you need the .fx files in the route with the game.exe file?
Those "other variables" are part of the material definition and not the shader (although the two are somewhat coupled). The .fx file has to live outside the resource for now. Im pretty sure that the engine uses the D3DXAssembleShaderFromFile call to load it, which means it can't be packed inside a resource file.
Quote:
Second ====== RenderMonkey can save shaders as FX files, but these files are not set up properly and so they must be....translated for A6. In the FX file itself ATI state this to be the case. So I need to understand how to translate it. Can someone point me at a 'Dummies Guide to Shaders' or give me some idea as to how to understand the figures as: m4x4 oPos, v0, c0 - means nothing to me! 
I know thats a vast question, but some sort of syntex help would be fantastic.
A good portion can be copied as-is, but you need to understand how the inputs are passed (the v# regs) and how the constants are setup. Keep in mind that most of the RenderMonkey shaders are geared around DX9, and many shaders are HLSL or use ps2.0, and they wont work with DX8.1.
Quote:
------------------------------------------------------
So far I have simply copied and pasted shader code, into the game, according to the instructions given, example Ventilators, wiki, and nothing more. I would like to start doing my own conversions, especially the volumetric lighting, motion-blur, and others effects.
I appreciate any help anyone can offer.
Never argue with an idiot. They drag you down to their level then beat you with experience
|
|
|
|