Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Dark GDK / Does DirectX 10 REALLY lose the hardware pipeline? i.e. No More Textured Poly?

Author
Message
jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 12th Jan 2008 03:30
I heard this - is it true? I know Point Sprites are gone... Tell me it isn't so! Tell me Textured Poly will always be a staple and Shaders are optional?!??!?!

Keo C
17
Years of Service
User Offline
Joined: 3rd Aug 2007
Location: Somewhere between here and there.
Posted: 12th Jan 2008 04:38
I'm pretty sure they are programmable now, and not fixed.

The best things in life are edible.
jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 12th Jan 2008 05:14
Programmable? Thanx for replying. Can I get a maybe a tiny bit more detail of what you mean Keo C? I appreciate your response... just a tiny bit more detail would help me understand alot more!

(Programmable - I understand - but not how you mean in this context) Programmable via Shaders? Or more control of how textures are laid down? etc...I'm not clear on your meaning.

dark coder
22
Years of Service
User Offline
Joined: 6th Oct 2002
Location: Japan
Posted: 12th Jan 2008 07:10 Edited at: 12th Jan 2008 07:11
It means the Fixed-Function Pipeline is removed, meaning there are no in-built Direct3D Ghost Object on, Set object transparency etc, it's all specified using shaders. Same goes for hardware lights, fog etc. I'd imagine all X10 versions of TGC stuff will have a big shader that has all of these DX9 features built in but can simply be switched on/off using constants. However if anything this makes development easier, as you have full access to the code behind the TNL. Plus DX10 uses a unified shader model so using shaders will be the same but better(potentially faster) than the fixed function pipeline.

jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 12th Jan 2008 12:03
tempicek
16
Years of Service
User Offline
Joined: 27th Nov 2007
Location: Prague
Posted: 12th Jan 2008 13:01
Quote: "However if anything this makes development easier, as you have full access to the code behind the TNL."


First, this will not make development easier since every engine/code written in FFP must be replaced by shaders when ported to DX10, which are a way harder to write than using FFP. Second, you have full access to the graphics processing pipeline since Shader Model 1 in DirectX 8 (year 2000). So basically the API structure was simplified by removing functionality.

Quote: "Plus DX10 uses a unified shader model so using shaders will be the same but better(potentially faster) than the fixed function pipeline."


Actually, FFP has nothing to do with shader unification. The actual code behind FFP is being "simulated" on hardware by shaders for years (since Radeon 9xxx, maybe longer). Unified shader model will result to higher performance in most cases, but for a different reason (it would be the same if the FFP stayed there).

The DX10 architecture has been rebuilt from the base and the FFP has fallen for the clarity and simplicity of the new API (this means a lot harder work for those who are accustomed to the FFP). It has always been a bit confusing - where the FFP actually ends and where the programmable part starts, because both parts were integrated to the same pipeline using the same commands for some stuff.

to Jason:
Quote: "Tell me it isn't so! Tell me Textured Poly will always be a staple and Shaders are optional?!??!?!"


Well, textured poly is still the staple but being processed by shaders and only shaders from now on
dark coder
22
Years of Service
User Offline
Joined: 6th Oct 2002
Location: Japan
Posted: 12th Jan 2008 13:36
Quote: "First, this will not make development easier since every engine/code written in FFP must be replaced by shaders when ported to DX10, which are a way harder to write than using FFP."


When ported maybe, but I personally find writing shaders far easier than using the FFP, especially when dealing with blending of multiple texture stages(to get the correct results you want, do any of the descriptions of the blend modes even make sense to you?). Getting simple lighting/specular highlights may take a bit longer via shaders but once it's written you don't have to again, and I'm sure there are example shaders for this made by Microsoft already.

Quote: "Actually, FFP has nothing to do with shader unification."


I was mainly referring to if you were to simulate the FFP using shaders only in pre DX10 you'd be limited to vertex and pixel shader units on the card(I'm no expert on how the FFP works but I'd assume emulating some FFP features using shaders would be slower under DX9, especially ones that make heavy use of pixel shaders, or maybe the FFP uses shader processors too?), whereas in DX10 vertex/pixel and geometry shaders can use all shading units, but again I don't know how the FFP works so I don't know.

tempicek
16
Years of Service
User Offline
Joined: 27th Nov 2007
Location: Prague
Posted: 12th Jan 2008 14:03
Quote: "When ported maybe, but I personally find writing shaders far easier than using the FFP, especially when dealing with blending of multiple texture stages(to get the correct results you want, do any of the descriptions of the blend modes even make sense to you?)."


I see, now I understand what you ment. Generally, you don't have to have much knowledge about transformations, lighting computations and other needed stuff if you use FFP. So it's a way easier for anyone starting with writing some 3D graphics. For creating more complex effect it's sometimes very tricky (or even impossible) to simulate them using FFP, but still it isn't easier than before since shaders are there for 7 years now.

Quote: "I'm no expert on how the FFP works but I'd assume emulating some FFP features using shaders would be slower under DX9, especially ones that make heavy use of pixel shaders, or maybe the FFP uses shader processors too?"


That's the case - FFP functionality is performed by shaders on hardware (again for years now). It would be expensive to implement two pipelines on a board.
jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 12th Jan 2008 14:38
So - for this simpleton - me - I can still make objects, and texture them... and beable to see what I did?

Are you saying things like UV coords and Vertex Normals are going away?

I'm sorry - I don't see the fuzzy line in the sand to well - but so far - I'm a little more reassured that what I'm learning and trying to do isn't in vain - from TempIceP's comment.

Thanx guys for discussing this. I'm learning... slowly... but surely.

tempicek
16
Years of Service
User Offline
Joined: 27th Nov 2007
Location: Prague
Posted: 12th Jan 2008 15:26
Hm, Jason, first I wanted to answer every your question separately, now I think I will take it from the other side - explain the background and hopefully you will get the picture ...

The pipeline looks like this

You put vertices inside, tell how they form each triangle and what information they contain (common structure description). Then the vertex is processed by vertex processing code (vertex shader) and then a triangle set up from those vertices is tesselated. Each generated fragment is colored by a pixel shader program and the final pixel is merged with the content of the screen.

The FFP simply covers the vertex shader and pixel shader program and performs some basic stuff on the primitive (you have a bunch of states which define the behavior). However you use the same code for describing the vertex, set up those vertices to the pipeline, define how triangles are culled and how the final pixel is merged with the "screen" data. So the only thing you will have to forget are those states which configure the FFP, all the other stuff remains the same. So I think there's not much you can know which will be useless in the future. So, don't be afraid, your time in learning the stuff will still be paid off. Besides, DX 9 will stay with us a long time since DX10 will never run on WinXP.
jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 12th Jan 2008 16:08
Thank you - My ultimate motivation (and worries) for asking have been answered. Thank you.

I'm trying to make a game - duh - but I'm making a terrain system... mesh + culling + texturing...maybe shader later - just wanted to know if I was ALL wrong... and I think I'm not ALL wrong and I can go forward with confidence. Thank you

tempicek
16
Years of Service
User Offline
Joined: 27th Nov 2007
Location: Prague
Posted: 12th Jan 2008 16:34
On the other side - if you have the knowledge of the 3d stuff, why not start with shaders straight away? Especially the texturing thing you are doing (you described it in another thread) would make a good use of it.
jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 12th Jan 2008 17:49
That's Easy. Shaders bring frame rates down alot compered to not. Like... 60fps vsync down to 9fps.

I am hoping to parhaps make a "ShaderLEss" shader - that creates textures I can use - consider them "Pre-Rendered" it does make more sense then doing the same calcs over and over in the GPU. So the idea is to be more efficient. Now, I understand having to big/to many textures is not good from a ram point of view - and shaders can allow recycling so to speak a given texture all over - and well.. that makes sense - but the FPS drop is so dramtic, I want to TRY to make a system that can run on low to high spec machines like they did (just saw first time yesterday) Halo.
Halo can run on anything with DirectX it seems - my kid has an old laptop - unable to play FarCry which is quite dated - but Halo Came right up. I want Iron Infantry to be that way. Additionaly - if its overkill - but then runs SUPER smooth on nicer boxes - I can live with that.

That's my reasoning.

I Wanted to use shaders - but FPS drops alot. Also, depending on usage - it doesn't always make sense to render EVERY pass something that could be rendered once and just used as is.

tempicek
16
Years of Service
User Offline
Joined: 27th Nov 2007
Location: Prague
Posted: 12th Jan 2008 18:37
Anything you do using FFP you can do at the same speed (more often faster) using shaders. So I really don't know what you are doing there, but you obviously do a lot more work than with FFP. If you are prerendering anything to a texture (seems to me that's what you are doing), you can do the same with shaders and/or use the texture in a shader then ...

If your target is Shader Model 1, than I can understand that it's really not a benefit, but that would be almost 10 year old graphics card, means about - what - 12 years old when your project is finished? That's an old piece of metal...
jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 13th Jan 2008 00:10
No - I have at least Shader2, frame rates aren't all that.

What doesn't make sense is - Calculating the Same numbers over and over in your graphics card - if you can precalc it and then just use the texture - there is less instructions neededing to occur to get same effect otherwise.

Now I understand - mismanagement here could be bad - like trying to use to many of such "PreRendered" textures... but every shader I've looked into the source, I notice a string of commands - like sin this, matrix that - those instructions AREN't always necessary if the effect can be reached another way. this would / should obviously free up GPU resources for the Stuff you WANT a shader on... like when you want to manipulate pixels in a texture (or many) somehow - via blending , shadows, lighting tricks, blurring whatever.

I do appreciate your comments on this matter, and my PC isn't that that old - and yeah - I could get a spruced up video card but I also am a strong proponant of trying to do things efficiently.

Also I'm grateful you explained the DirectX10 Implications.

Yes the shaders allow using less textures - and using processing etc to cover a landscape for example, however, if its a small enough landscape, and you have a texture that already is how you want - it seems obvious the less you ask your video card to do the the more horsepower you have in researve when you need it.

Whether C++, Assembly Langue or GPU "Assembly" or "HLSL or whatever... Executing commands because you can and not because they are needed CAN add up to to slop... I just don't want to bloat my software more than necessary - regardless where its actually running.

david w
18
Years of Service
User Offline
Joined: 18th Dec 2005
Location: U.S.A. Michigan
Posted: 13th Jan 2008 00:35
Way of the future. Shaders for everything. Its just plain better if you ask me. I already do this in dbp anyways. I dont have any problems and the only slop you have is what you make. Anyways, im pretty much done with terrain's and experimenting. I'm moving on to actually making my game now. Anyways, DX10 isnt really that big of a deal for a few more years at the least, cause of the popularity of XP and dx9.. Think about this, if you were a pro game maker, and you had to risk millions of dollars, would you develp for dx9 or dx10. I know what one I would pick. No question about it.

so your safe with your plain dx9 textures for years to come.
Keo C
17
Years of Service
User Offline
Joined: 3rd Aug 2007
Location: Somewhere between here and there.
Posted: 13th Jan 2008 04:30
FX Composer is good for shaders. Oh and so is DarkShader.

The best things in life are edible.
tempicek
16
Years of Service
User Offline
Joined: 27th Nov 2007
Location: Prague
Posted: 13th Jan 2008 09:39
Quote: "What doesn't make sense is - Calculating the Same numbers over and over in your graphics card - if you can precalc it and then just use the texture - there is less instructions neededing to occur to get same effect otherwise."


What I was trying to tell you is this: if you need some precalculations (like combine several textures to one), you can do them with shaders too and you can use the result in your shader. And it is never slower than with FFP.

Quote: "every shader I've looked into the source, I notice a string of commands - like sin this, matrix that - those instructions AREN't always necessary if the effect can be reached another way."


Like which way? FFP? If you do a basic transformation in vertex shader, it's a serie of matrix multiplications. If you do it with FFP, those transformations are there even though you don't see the default shader which is performing them! How else would it transform the vertex?

Quote: "Also I'm grateful you explained the DirectX10 Implications."


Actually I didn't explain much. It's an amazingly well designed API a far better than any predecessor, but stay away from it some years if you are not planning AAA title

Quote: "Executing commands because you can and not because they are needed CAN add up to to slop... I just don't want to bloat my software more than necessary - regardless where its actually running."


It's not the way I suggest. Using shader will never increase the work of the video card. As I explained before - imagine the FFP as high-level interface for performing the basic 3D stuff. It can't do that faster, because it uses shaders for the job in the background. So you probably made more stuff than necessary when you switched to shaders - if you can precalculate something for FFP, you can do the same for shaders etc.

But don't take me wrong. I'm not trying to persuade you, that you must learn/use shaders. I'm just explaining how it works so you can make an "informed decision".

//rem
jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 13th Jan 2008 15:29
Well Sir, This Aggressive'ish to details discussion has been great. You've told me alot and I appreciate it. You Told Me in not so many words I can use the shaders realtime like always, precalcing stuff is still a cool thing to do - I can use shaders to make media and or process once here then use the "processed" stuff there over and over. Its techniques like that - depending on the scenario that are wise if they apply. That is good news.

Also you stated it was a great API and you aren't a newbie and are an accomplished coder so when I hear another serious coder say it REALLY IS a great API - I give that alot of stock. (Especially because serious Coders don't sling that phrase around to readily )

I'm persuaded just fine regardless of your intent. So Its on my todo list - but but current charge thankfully still has merit and I will continue to endeavor on.

Bottom line is I have been having a lot of fun wrapping my head around this stuff and getting parts of it to work - and even sometimes enjoying that I mess something up but understand why! (Twisted I know) and that all the "Theory" I'm learning will apply to DX10 - I'm actually quite pleased you (TempIceP), DarkCoder piped up and Keo also!

Thanx! I'm in a good space now And a little less "freaked" bout DirectX 10 nullifying my work in the future!

Login to post a reply

Server time is: 2024-10-08 15:58:49
Your offset time is: 2024-10-08 15:58:49