PDA

View Full Version : True dynamic branching


Abba Zabba
04-21-05, 05:07 AM
Since a lot of people claim that PS3.0 is dog slow on the current generation of hardware, I figured I'd prove em all wrong once and for all :D by showing a "refurbished" demo that uses dynamic branching to abort light computation for pixels laying outside of a specific range.
This demo will run the PS3.0 path only on NV40 hardware, all the other DX9.0 cards will be forced to run the PS2.0 shaders.
This demo is a first of a serie that I want to exclusively dedicate to Nvidia NV40 hardware class. Hopefully the next one will really show the advantage of PS3.0 and TRUE dynamic branching over PS2.0 for special effects.

http://www.realityflux.com/abba/C++/Dynamic%20Branching/dynamicBranching.jpg
Binaries (http://www.realityflux.com/abba/C++/Dynamic%20Branching/DynamicBranching.zip)
Source (http://www.realityflux.com/abba/C++/Dynamic%20Branching/DynamicBranchingSRC.zip)
Engine source (http://www.realityflux.com/abba/C++/SXMLEngine/SXMLEngine.zip)

wEEt
04-21-05, 06:39 AM
Nice.

NoWayDude
04-21-05, 06:44 AM
Very nice
Some results @ 1280x1024 w/ fraps

Frames, Time (ms), Min, Max, Avg
3380, 40231, 70, 110, 84.015

http://img253.echo.cx/img253/479/scenegraph20050421124316345hc.th.jpg (http://img253.echo.cx/my.php?image=scenegraph20050421124316345hc.jpg)

|MaguS|
04-21-05, 06:58 AM
Is there a way to switch between PS2.0 and PS3.0? Would be a good way to show the difference...

Toss3
04-21-05, 09:05 AM
Could someone post a comparison between ps3.0 and ps2.0 and the fps difference, so that we could see if ps3.0 really lowers performance or not?

gstanford
04-21-05, 09:16 AM
Someone needs to start a thread @ beyond3d about this. I would, but dave doesn't like me anymore...

Strahd
04-21-05, 10:09 AM
Hmm... The way I understand this is that 2.0 is used unless you boost the quality to high. If you lowered the IQ (not resolution), It should drop to 2.0. Well, atleast it does with farcry. It's worth a shot anyway.

Hey Abba, I was wondering what the specs were on a GeFroce 6800, is that a new model? :)

fivefeet8
04-21-05, 10:16 AM
Would be cool to showcase some new SM3 demo's. How about a TRue Displacement Mapping demo? HDR FP16 demo?

PeterJensen
04-21-05, 10:43 AM
i would love some SM 2.0 results so we could compare :)

nIghtorius
04-21-05, 11:16 AM
I forced it to render in PS2.0 mode by renaming the PhongPS2.xml file to PhongPS3.xml..

with PS3.0 mode it attained an average fps of 70fps
with PS2.0 mode it attained an average fps of 75fps (+5)

May I conclude that PS2.0 is faster?

edit:

That fragment program selector? when @ default xml filenames "fragment program #1" performs faster than "fragment program #2" may I conclude that fragment program #1 = PS2.0 and the other = PS3.0?

|MaguS|
04-21-05, 11:17 AM
Hmm... The way I understand this is that 2.0 is used unless you boost the quality to high. If you lowered the IQ (not resolution), It should drop to 2.0. Well, atleast it does with farcry. It's worth a shot anyway.

Hey Abba, I was wondering what the specs were on a GeFroce 6800, is that a new model? :)

Wow that was one clueless and uninformatibe post. We all know that Farcry will switch SM codes depending on the quality settings, but that has nothing to do with a demo that is no way or shape based off FC's.

There is no way to change the quality settings on this demo... it just runs...

NoWayDude
04-21-05, 12:01 PM
I forced it to render in PS2.0 mode by renaming the PhongPS2.xml file to PhongPS3.xml..

with PS3.0 mode it attained an average fps of 70fps
with PS2.0 mode it attained an average fps of 75fps (+5)

May I conclude that PS2.0 is faster?

edit:

That fragment program selector? when @ default xml filenames "fragment program #1" performs faster than "fragment program #2" may I conclude that fragment program #1 = PS2.0 and the other = PS3.0?
How did u do this?There is both a PhongPS2 and PhongPS3 already on my Xml file.
Could you be more especific so i can try this also?
On normal mode, wirhout changing anithing, swaping from fragment program 1 to 2 does absulotely nothing on my FPS

SpamBot
04-21-05, 12:22 PM
If you look at the source you can see that:
ps3.0 = Fragment program 2
ps2.0 = Fragment program 1

My scores:
ps3.0 gives between ~100 and ~190 fps
ps2.0 gives ~100 to ~130 fps

this is on a 6600GT

Toss3
04-21-05, 12:58 PM
If you look at the source you can see that:
ps3.0 = Fragment program 2
ps2.0 = Fragment program 1

My scores:
ps3.0 gives between ~100 and ~190 fps
ps2.0 gives ~100 to ~130 fps

this is on a 6600GT
so ps3.0 is faster?
that's at least some good news..

Abba Zabba
04-21-05, 01:44 PM
Guys I think you're missing the point that I'm trying to make here:
PS3.0 is NOT SLOW compared to PS2.0, as a matter of fact the frame rate is the same on my machine when I switch from one to the other.
However as a programmer, using PS3.0 made life easier for me since I don't have to write as much code as in PS2.0 to accomplish the same effects.
For instance the NRM and DIV instructions that saves me so much typing, look at the source code and compare for yourself.
The next demo however will show the true potential of PS3.0 by creating an effect in realtime that almost no PS2.0 path could accomplish (unless cheating)
PS: the PS2.0 path should render correctly on ATi cards now, for some reason I totally forgot about near/far plane clipping :p

GlowStick
04-22-05, 02:31 AM
Nice demo, Also very nice previous demos!

Cant wait for new demos to show to my friends!