Use hlsl to replace fixed pipeline.
In xbox360 there is no fixed pipeline and the IDirect3DDevice9 lost some interfaces.But there are some code that used the removed interfaces, so I have to write some shader file to do the same thing.
Removed functions:
SetTextureStageState()
SetTransform()
ColorFill()
I am not familiar with the HLSL, so anyone can help me or give some tips? Thanks very much!
Isn't that forbidden by the law to publicly discuss non-public X360's API? ;)
Btw. to support fixed pipeline you have to understand it first, i.e. understand what and how (mathematically) each of the fixed pipeline's function does whatever it does. Once you're confident with that you just need to learn HLSL - I recommend you look at DirectX SDK samples first.
Btw. to support fixed pipeline you have to understand it first, i.e. understand what and how (mathematically) each of the fixed pipeline's function does whatever it does. Once you're confident with that you just need to learn HLSL - I recommend you look at DirectX SDK samples first.
If you're doing native development on an X360 then you're an official developer in the eyes of MS (as far as I understand) so you should have access to their developer mailing lists and newsgroups. I would imagine developers frequenting these groups will be more experienced with porting older fixed-function PC code to X360 API's.
ATI had a set of shaders for emulating the fixed function pipeline and the later DXSDKs' have the 'FixedFuncEmu' sample for D3D10. The latter isn't a perfect match, but it might give you some clues...
hth
Jack
ATI had a set of shaders for emulating the fixed function pipeline and the later DXSDKs' have the 'FixedFuncEmu' sample for D3D10. The latter isn't a perfect match, but it might give you some clues...
Quote:SetTextureStageState()On the PC you specify these within the relevant pass{} using the syntax described here. I would imagine something similar exists on X360.
Quote:SetTransform()You'll simply pass in your matrices as constants to the shader - often having the World*View*Projection premultiplied into a single matrix to increase efficiency.
Quote:ColorFill()Rendering a screen-aligned/full-screen quad with a pixel shader outputting a constant colour is a functional substitute for this operation.
hth
Jack
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement