Skip to main content
gamedev.net
🔒 Locked

Soft-Wired Shaders

Started by C0D1F1ED May 1, 2003 at 10:52 AM 3 replies 650+ views
Original Post
C0D1F1ED
C0D1F1ED
I''ve created a software renderer which supports ps 2.0 shaders. Unlike the reference rasterizer, it is not an interpreter but an optimized JIT compiler using SIMD instructions. So it is dozens of times faster than refrast and beats hardware in flexibility. For one, it is no problem to go beyond the 32 texture instructions limit in ps 2.0 hardware, while still keeping things real-time. You can read the details here: [url]http://www.flipcode.com/cgi-bin/msg.cgi?showThread=COTD-swShader&forum=cotd&id=-1[/url].
C0D1F1ED
C0D1F1ED
Comments welcome!
IFooBar
IFooBar
Amazing work. Love your softwire software too. One question though, how do you get it to run way better then the REF device in d3d? I would''ve assumed that MS would make their reference rasterizer at least half as fast as your software renderer.


:::: [ Triple Buffer V2.0 ] ::::
[size=2]aliak.net
CpMan
CpMan
Yeah, but the refrast, while optimized, is done for correctness, not speed. It supports every feature, and takes no shortcuts. That''s why it''s used for compatibility testing.



Gamedev for learning.
libGDN for putting it all together.
An opensource, cross platform, cross API game development library.
VSEDebug Visual Studio.NET Add-In. Enhances debugging in ways never thought possible.
C0D1F1ED
C0D1F1ED
Refrast is totally NOT optimized. It doesn''t use any MMX/SSE instructions and it doesn''t use branch elimination. It''s an interpreter which means it also wastes time parsing the shader. It''s just written in plain C...

swShader compiles ps 2.0 code into x86 code using lots of MMX and SSE instructions. It uses only the code path for the current render state, so all compare and branch instructions are eliminated. A caching system makes sure that you can switch render modes efficiently. So what you get is THE optimal code for a certain situation. No compromises.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.