CreateVertexShader() fails...:(

Started by
4 comments, last by Nedelman 23 years ago
Anybody have any ideas why a CreateVertexShader() call might fail? A previous call to D3DXAssembleShaderFromFile() works fine, returning no errors. Yet the following CreateVertexShader() call fails mysteriously. I''ve exhausted all possibilities here...I''m using a braindead shader...damn, this is so frustrating. If someone could shed some light on some possible answers I''d be so happy. Thanks.
www.gameprojects.com - Share Your Games and Other Projects
Advertisement
D3DXAssembleShaderFromFile() id implemented in software, its just a simple assembler written by some snot nose at MS.


CreateVertexShader() on the other hand tells DX to upload the asseembled routine onto your T&L GeForce3 force card that I know you have installed on your machine.

Whats this?

you don''t have it installed?

Don''t worry, I have a Voodoo 5500, it even came with a big stick to beet the crap outta other cards with. CreateVertexShader() raises its middle finger.

If you want to use shaders (vertex/pixel) you need to use the reference rasterizer. yeah thats right, any scene larger than 80 pixels by 60 will run slower than 10 fps.

You see, MS made a deal with NVIDIA, ''you give me hardware and we''ll give you an open shader spec you can speciffy yourselves'' kinda thing. Vialo, XBox, GeForce3 and DX8.

Anyway, if you are running a P4 at 2GHz check out NVIDIAs web site. They have approximately 40 MB (no joke) on shaders and shader SDK''s.


enjoy..........


D.V.

--------------------------
Carpe Diem
D.V.Carpe Diem
1. Correct(ish) about the difference between CreateVertexSharder and the D3DX functions.
CreateVertexShader uploads to the HAL though - if software vertex processing is turned on, then this goes through the PSGP (Processor Specific Geometry Pipeline) which is the same place fixed function calls go on non-T&L cards.

On a T&L card which does support shaders, the driver translates from MS/NV vs code to the card specific microcode.


2. You DO NOT need to run in RefRast to be able to use vertex shaders - set up a HAL device and set vertex processing to MIXED. When creating the VBs for shader use, set the vertex processing type to SOFTWARE. Rasterisation will still happen in hardware! (we run 10000 polys through vs at 60fps on a Matrox G400 using software vertex processing).


3. Yes, the shader spec was developed by nVidia and changed by MS, but that DOES NOT mean that only nVidia hardware will support shaders - quite the opposite - every major manufacturer is releasing shader capable hardware.


4. Download the vertex shader samples from the nVidia site, then try them on a non-shader card - they do work without refrast!

--
Simon O''''Connor
Creative Asylum Ltd
www.creative-asylum.com

Simon O'Connor | Technical Director (Newcastle) Lockwood Publishing | LinkedIn | Personal site

Oh man S1CA, thanks so much. The vertex processing flag (specified in the call to d3d->CreateDevice()) was my problem. I was specifying HARDWARE. Since I have a Radeon that was a bad idea. The switch to SOFTWARE was what I needed. Thanks.

www.gameprojects.com - Share Your Games and Other Projects
> Since I have a Radeon that was a bad idea

that''s not the problem!!!!
Radeon have full support of vertex shader in hardware!
(With MS specs, the dx8 shaders, are full or not)
So make shure that you got some DX8 drivers.

The thing that is not clear is if it has Pixel shader support...
First, you must enable it tweaking the registry, and then there still one instruction left behind... (it is a driver thing or a hardware one?)

Also, the vertex and pixel shader in software mode, works good enough (they are really optimized, MS did a really good job in this).

It''s funny to look how NVIDIA makes a lot of noice today about vertex shaders, when ATI have almost a year with that tech....


Radeon does have hardware vertex shader support, but not hardware pixel shader support.

Maybe if you matched the processing calls then it wouldn''t fail.

-Mezz

This topic is closed to new replies.

Advertisement