PC Ekspert Forum

PC Ekspert Forum (https://forum.pcekspert.com/index.php)
-   AMD Radeon (https://forum.pcekspert.com/forumdisplay.php?f=11)
-   -   Dynamic branching (https://forum.pcekspert.com/showthread.php?t=11248)

Jelc 03.07.2004. 00:01

Dynamic branching
 
Evo-Humus je izbacio jedan dosta zanimljiv demo, a kaže sljedeće:
One of the main features of pixel shader 3.0 is that is supports dynamic branching (also called data dependent branching), something that nVidia of course makes a big deal about. This demo however shows a way to implement dynamic branching without pixel shader 3.0, using basic graphics functionality such as alpha testing and stencil testing. Not only is it doable, but also gives every bit of the performance of real dynamic branching.
One scenario where dynamic branching comes in handy is when you have range-limited lights. Whenever a fragment is outside the range of the light, you can skip all the lighting math and just return zero immediately. With pixel shader 3.0 you'd simply implement this with an if-statement. Without pixel shader 3.0, you just move this check to another shader. This shader returns a truth value to alpha. The alpha test then kills all unlit fragments. Surviving fragments will write 1 to stencil. In the next pass you simply draw lighting as usual. The stencil test will remove any fragments that aren't tagged as lit. If the hardware performs the stencil test prior to shading you will save a lot of shading power. In fact, the shading workload is reduced to the same level of pixel shader 3.0, or in some cases even slightly below since the alpha test can do a compare that otherwise would have to be performed in the shader.
The result is that early-out speeds things up considerably. In this demo the speed-up is generally in the range of two to four times as fast than without early-out. And with more complex lighting, the gain would have been even larger.

This demo should run on Radeon 9500 and up, and GeForce FX 5200 and up.

Required Direct3D capabilities:

Pixel shader 2.0
Vertex shader 1.1

Nije velik, samo megu.
http://esprit.campus.luth.se/~humus/...cBranching.zip

Inače-onim mulcima iz ATI-ja je konačno došlo iz guzice u glavu i odlučili su dotičnog zaposliti.
Čini mi se da je i to u vezi sa glasinama da ATI namjerava izbaciti kompletno novi OGL driver.

Meni je osobno jako drago kaj ga je ATI udomio-nadam se da će se i rezultati uskoro vidjeti.

pinsla 03.07.2004. 01:13

meni je također drago
čovjek je zakon
skinuo sam par njegovih demoa i svi su zgledali odlično i kaj je najbolje vrtili su se bez problema na 8500 i nadalje tak da i ja mislim da bude atijev gl drajver sve bolji i bolji

Jelc 03.07.2004. 15:35

Citiraj:

Originally posted by pinsla
meni je također drago
čovjek je zakon
skinuo sam par njegovih demoa i svi su zgledali odlično i kaj je najbolje vrtili su se bez problema na 8500 i nadalje tak da i ja mislim da bude atijev gl drajver sve bolji i bolji

Navodno bi do prosinca trebali izbaciti skroz novi driver.
E sad...budući da ih je Nvidia malo stisnula i da je drž-nedaj oko izrade GPU-a za dobrog starog Billa, ja si sve nekaj mislim da bu do prosinca izašle još bar dvije unaprijeđene revizije sadašnjih grafi.

ßellerophon 04.07.2004. 17:08

zanimljivo


Sva vremena su GMT +2. Sada je 14:09.

Powered by vBulletin®
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
© 1999-2024 PC Ekspert - Sva prava pridržana ISSN 1334-2940
Ad Management by RedTyger