|
|||||||
|
|
|
![]() |
|
|
Strumenti |
|
|
#1 |
|
Senior Member
Iscritto dal: Apr 2002
Città: Padova
Messaggi: 11396
|
Demo Dynamic Branching per PS2.0!
![]() 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 http://esprit.campus.luth.se/~humus/3D/index.php DOWNLOAD DEMO http://esprit.campus.luth.se/~humus/...cBranching.zip Praticamente il dynamic branching coi ps2.0 richiede meno potenza dagli shader che coi ps3.0 perchè il controllo se la luce è visibile o non non viene fatto con uno shader...
__________________
HP Pavilion dv6599el ~ Core2Duo T7300 ~ 2GB BDDR2 ~ GeForce 8400gs ~ Hd 160GB |
|
|
|
|
|
#2 |
|
Senior Member
Iscritto dal: Mar 2003
Città: Verona
Messaggi: 8547
|
__________________
Cammello non parla di neve Xbox LIVE Gamertag VirtualBoy75 |
|
|
|
|
|
#3 | |
|
Senior Member
Iscritto dal: Apr 2002
Città: Padova
Messaggi: 11396
|
Quote:
__________________
HP Pavilion dv6599el ~ Core2Duo T7300 ~ 2GB BDDR2 ~ GeForce 8400gs ~ Hd 160GB |
|
|
|
|
|
|
#4 | |
|
Senior Member
Iscritto dal: Feb 2000
Messaggi: 11220
|
Quote:
__________________
PC 1 : |NZXT 510i|MSI PRO Z690 A|I5 [email protected] Ghz (Pcore) 4.5 Ghz (Ecore)|AIO ENDORFY NAVI F280|32 GB BALLISTIX 3600 cl 14 g1|GIGABYTE 4070 SUPER AERO OC|RM850X|850 EVO 250|860 EVO 1TB|NVMe XPG-1TB||LG OLED C1 - 55 | PC 2 : |Itek Vertibra Q210|MSI PRO B660M-A|I5 12500|32 GB KINGSTON RENEGADE 3600|ARC A770 LE 16 Gb|MWE 750w| ARC 770 LE 16 Gb Vs RTX 3070 - CLICCA QUI |
|
|
|
|
|
|
#5 | |
|
Senior Member
Iscritto dal: May 2003
Messaggi: 12349
|
Quote:
__________________
"Il potere non te lo dà un distintivo, o una pistola. Il potere te lo danno le bugie, grandi bugie e convincere il mondo a parteggiare per te. Se riesci a fare accettare a tutti di quello che in cuor loro sanno essere falso, li tieni per le palle..." |
|
|
|
|
|
|
#6 |
|
Senior Member
Iscritto dal: Jan 2002
Città: Firenze
Messaggi: 8720
|
maury sta faccina mi spezza dal ridere!!
![]()
__________________
CPU: Intel® Core 2 Quad Q9650 MoBo: Abit IX38 QuadGT Mem: 4096 Mb Trascend Scheda Video: Sapphire ATi Radeon HD6950 2Gb DDR V Monitor : Samsung SyncMaster 940BW Scheda Audio: Creative Sound Blaster Audigy 2 ZS Masterizzatore DVD: Pioneer DVR-112 Lettore DVD: Toshiba SD-M1712 |
|
|
|
|
| Strumenti | |
|
|
Tutti gli orari sono GMT +1. Ora sono le: 02:28.





















