Jose Rodolfo

Hello, I'm studying the possibility to use XNA todevelop some educational games, but I Have a doubt, does every student that will play a simple game of mine will have to buy a video card that supports pixel shader

I wonder if there is a way to develop a game in XNA and not to use pixel shader, I'm from Brazil, and many of the students does not have a good video card.



Re: XNA Framework Pixel Shader 1.1

George Clingerman

I'm sorry. The minimum requirements for XNA itself require pixel shader 1.1 or better. There just is no getting around this requirment. You will not be able to develop any game (or play any XNA game) no matter how simple it is without meeting this requirement.

Video cards that meet this requirement are not newer cards, you can pick up older cards that meet this requirement. It is frustrating I know, but there just is no way around it.





Re: XNA Framework Pixel Shader 1.1

JuanK_solocodigo

Hi,

that's true only if you live in USA or in another developed country,

in underdeveloped countries like Brazil or Colombia or really in any latinamerican country the most of the people don't have access to obtain a video card with this 'minimal requeriments' and if they can obtan it sure they don't have the money to pay it.

I'm from Colombia, i'm lucky and i have the money and the access for this kind of technologies but the most of mi friends don't have it.

I remembered my dissapointment wheh i did try to run one of my xna games in one of my friends pc's...

I believe that a big point would be that in future XNA releases the runtime and frameworks include support to low levels video card or at least support to run using Reference Rasterizer in a low profile video card.






Re: XNA Framework Pixel Shader 1.1

Shawn Hargreaves - MSFT

You can run with the reference rasteriser today if you want, but the framerate will be way too slow for this to be useful (typically only one or two frames a second).

XNA is fundamentally built on shader technology. I'm sorry if that's not a good answer for you, but that's just the way it is. This is extremely unlikely ever to change.





Re: XNA Framework Pixel Shader 1.1

JuanK_solocodigo

ok, but
if the card does not support pixel shader 1.1 the reference rasterizer will not run neither and i believe that this restriction is not neccesary when you run using it.

Restrict the use of the reference rasterizer if your hardware rasterizer doesn't support pixel shader 1.1... i believe that this have no sense;




Re: XNA Framework Pixel Shader 1.1

Jose Rodolfo

I'm said to hear that.

thanks for answering.






Re: XNA Framework Pixel Shader 1.1

Shawn Hargreaves - MSFT

JuanK_solocodigo wrote:
ok, but
if the card does not support pixel shader 1.1 the reference rasterizer will not run neither and i believe that this restriction is not neccesary when you run using it.

Restrict the use of the reference rasterizer if your hardware rasterizer doesn't support pixel shader 1.1... i believe that this have no sense;


You can use the reference rasterizer just fine on cards that have no pixel shader support. You need to install the full DirectX SDK to get this, though, because it is not a part of the end user DirectX redistributable. There have been various threads in these forums about how to set that up: searching for "reference rasterizer" should turn them up.

This really isn't a useful way to get your game running, though. The reference rasterizer is very, very slow. Way too slow to actually work for playing a game.





Re: XNA Framework Pixel Shader 1.1

JuanK_solocodigo

i have the SDK installed in my pc in my job, the card dont have support for pixel shader 1.1 and i can¡¯t debug or run anything.

in the documentation around the web i found that before XNA beta 2 is not possible to run any program in reference rasterizer mode without have a video card that support it.

The only way that works... and not so well was ...

take a look to this link: http://www.nuclex.org/articles/using-the-reference-rasterizer-in-xna

In the final paragraph: Beta2 of the XNA framework made it rather easy to run your XNA projects on the reference rasterizer. In the final 1.0 release, XNA's GraphicsDeviceManager will only start up when there's a shader-capable graphics card installed - even if you wish to use the reference rasterizer.

And thats true... at this time i have never been able to run any program in my office without use this hack class... and lastly i no longer use the hack because they don't work so well when you try to scale surfaces... oh and i found some little differences in the color procceses, usually when you use alpha in textures..






Re: XNA Framework Pixel Shader 1.1

Laurent

You can work around this "limitation" by doing "things" such as:



public static IntPtr GetDeviceComPtr ( GraphicsDevice device )
{
// Use reflection to get the device Com Ptr from the GraphicsDevice
FieldInfo fi = device.GetType ( ).GetField ( "pComPtr" , BindingFlags.NonPublic | BindingFlags.Instance );
object value = ( fi.GetValue ( device ) );
return ( IntPtr ) Pointer.Unbox ( value );
}

and :

public static void OnResetDevice ( GraphicsDevice device )
{
deviceComPtr = IntPtr.Zero;
// Use reflection to get the device Com Ptr from the GraphicsDevice
deviceComPtr = GetDeviceComPtr ( device ) ;
// Get the d3d Com Ptr from the Device ( will need a release )
d3dComPtr = GetD3DComPtr ( deviceComPtr );

//
bool [ ] verifiedCanDraw ;
FieldInfo fi = device.GetType ( ).GetField ( "_verifiedCanDraw" , BindingFlags.NonPublic | BindingFlags.Instance );
verifiedCanDraw = ( bool [ ] ) ( ( fi.GetValue ( device ) ) );
for ( int i = 0 ; i < verifiedCanDraw.Length ; i++ )
{
verifiedCanDraw [ i ] = true;
}
}


Pretty ugly, I do admit...




Re: XNA Framework Pixel Shader 1.1

JuanK_solocodigo

Laurent wrote:
You can work around this "limitation" by doing "things" such as:



public static IntPtr GetDeviceComPtr ( GraphicsDevice device )
{
// Use reflection to get the device Com Ptr from the GraphicsDevice
FieldInfo fi = device.GetType ( ).GetField ( "pComPtr" , BindingFlags.NonPublic | BindingFlags.Instance );
object value = ( fi.GetValue ( device ) );
return ( IntPtr ) Pointer.Unbox ( value );
}

and :

public static void OnResetDevice ( GraphicsDevice device )
{
deviceComPtr = IntPtr.Zero;
// Use reflection to get the device Com Ptr from the GraphicsDevice
deviceComPtr = GetDeviceComPtr ( device ) ;
// Get the d3d Com Ptr from the Device ( will need a release )
d3dComPtr = GetD3DComPtr ( deviceComPtr );

//
bool [ ] verifiedCanDraw ;
FieldInfo fi = device.GetType ( ).GetField ( "_verifiedCanDraw" , BindingFlags.NonPublic | BindingFlags.Instance );
verifiedCanDraw = ( bool [ ] ) ( ( fi.GetValue ( device ) ) );
for ( int i = 0 ; i < verifiedCanDraw.Length ; i++ )
{
verifiedCanDraw [ i ] = true;
}
}


Pretty ugly, I do admit...

Wow...

really ugly, i believe this code works.

I understand the solution, but let me ask you something: How did you find this






Re: XNA Framework Pixel Shader 1.1

Laurent

Just using a dissassembler ( such as Reflector ) to see the XNA source code




Re: XNA Framework Pixel Shader 1.1

Barbarian of the West

Hello Everybody,

I'm Barbarian of the West and I purchesed a game called Medieval II Total War. I inserted the game and it came up an error and saying that I need Pixel Shader 1.1. or better. Can anyone tell me about these Pixel Shader's can you download them is it a graphics card can someone please tell me what these pixel shaders are.........

Thanks Please post a comment if you anything about these pixel shaders.

BARBARIAN OF THE WEST





Re: XNA Framework Pixel Shader 1.1

Barbarian of the West

Please someone tell me what this pixel shader 1.1 or better is Please I really want to play Medieval II Total war Please if you know anything about pixel shaders even a store you buy them from please telll me!!!!

BARBARIAN OF THE WEST

P:S DESPRETE HERE WANT TO PLAY MEDIEVAL II TOTAL WAR





Re: XNA Framework Pixel Shader 1.1

Jim Perry

You need a graphics card that supports the specified Shader Model. See these pages:

http://en.wikipedia.org/wiki/Comparison_of_ATI_Graphics_Processing_Units
http://en.wikipedia.org/wiki/Comparison_of_NVIDIA_Graphics_Processing_Units

You'll want a card that supports at least DirectX 8, but get a card that supports Shader Model 2.0 if you can.






Re: XNA Framework Pixel Shader 1.1

Barbarian of the West

Thanks Alot Jim,

Can you go on this website because I'm thinking of buying this Graphics Crad does it support shader model http://www.eclipsecomputers.com/product.aspx okay thanks Jim or if anoyone be kind enough to go on that website and find out if it supports Shader Model I think Thanks again Boys.

BARBARIAN OF THE WEST