Archived

This topic is now archived and is closed to further replies.

C0D1F1ED

DirectX 9 Pixel Shader Emulation

Recommended Posts

Has anyone tried to get DirectX 9 Pixel Shader Emulation working? DirectX 9 should support up to ps 3.0 but there''s no hardware supporting this yet so I was curious about the performance of the emulator. Is it really terribly slow or is it optimized with MMX and SSE instructions? What''s the FPS for rendering a Phong shaded teapot? I can''t test it myself because I will soon have my mid-term exams and I''ve let my girlfriend put a password on my development drive

Share this post


Link to post
Share on other sites
If you''re talking about the Reference Rasterizer, then it''s only inteded for development and testing purposes - as such it isn''t available in the end user DirectX runtimes (i.e. you''re only guaranteed to have it if you have the SDK) and it isn''t at all optimised (the source code to the old version is in the DDK - the emphasis is on CORRECTNESS). A Phong shaded teapot you say? - humm - I''d say about 5 frames per second.

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

Share this post


Link to post
Share on other sites
I know the software vertex shaders use simd pipeline on cpu for speed. I have gf2 and use softwarevertexprocessing flag when creating the device. I think the software pixel shaders must use REF rasterizer for the device, though I haven''t written a pixel shader yet so I don''t know exactly.

Share this post


Link to post
Share on other sites
BTW, what''s the difference between vs_2_0/vs_2_0_sw, ps_3_0/ps_3_0_sw, ...? MS docs say that the _sw ones implement full feature set in software. Can I run for example the new ps_2 on a card that doesn''t support it without REF?

Share this post


Link to post
Share on other sites
There aren''t any software fallbacks for pixel shaders when running on a D3DDEVTYPE_HAL device. You can run all pixel shader models on the ref device (D3DDEVTYPE_REF). vs_2_0, vs_3_0, ps_2_0, ps_2_x, and ps_3_0 all have limits on constant count, register count, and instruction count. The _sw (software) models for the reference rasterizer increase those counts beyond the hardware spec to very high values, though not unlimited. They allow you to write shaders for hardware that''s several years away and prototype new effects without worrying about limits.

Share this post


Link to post
Share on other sites
quote:
Original post by S1CA
If you''re talking about the Reference Rasterizer, then it''s only inteded for development and testing purposes - as such it isn''t available in the end user DirectX runtimes (i.e. you''re only guaranteed to have it if you have the SDK) and it isn''t at all optimised (the source code to the old version is in the DDK - the emphasis is on CORRECTNESS). A Phong shaded teapot you say? - humm - I''d say about 5 frames per second.

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


from my experience, 5 frames a second is a little extravagant :D

my guess is more like 0.3fps

this is a pixel shader emulation, and phong shading, right

Share this post


Link to post
Share on other sites
quote:
Original post by Crazy_Vasey
5 seconds per frame would probably be more like it...


I''m lucky - at work Intel & AMD send me nice new hardware to play with (on the condition that our PC based games take advantage of what their stuff does ;o)

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

Share this post


Link to post
Share on other sites