High Level Shader Language
High Level Shader Language (HLSL) is een shading taal (niet te verwarren met een programmeertaal) die gebruikt wordt voor pixel shading van driedimensionale graphics in computerspellen en andere programma's in Windows.
HLSL werd geïntroduceerd in DirectX 9 (een verzameling van APIs die het programmeurs eenvoudiger maakt computerspellen te programmeren), als vervanging voor de Assembly-taal die daarvoor gebruikt werd (sinds DirectX 8), om meer complexe vertex- en pixel shaders te schrijven.
High Level Shader Language is een high level language zoals de programmeertaal C, waar het op gebaseerd is, maar het is meer gelimiteerd dan C omdat het toegespitst is op het programmeren van pixel shaders.
De taal werd nog verder ontwikkeld bij de release van DirectX 10.
Pixel shader comparison
| PS_2_0 | PS_2_a | PS_2_b | PS_3_0[1] | PS_4_0[2] | |
|---|---|---|---|---|---|
| Dependent texture limiet | 4 | onbeperkt | 4 | onbeperkt | onbeperkt |
| Texture instructie limiet | 32 | onbeperkt | onbeperkt | onbeperkt | onbeperkt |
| Positie register | |||||
| Instructie slots | 32 + 64 | 512 | 512 | ≥ 512 | ≥ 65536 |
| Uitgevoerde instructies | 32 + 64 | 512 | 512 | 65536 | onbeperkt |
| Texture indirecties | 4 | Onbeperkt | 4 | onbeperkt | onbeperkt |
| Interpolated registers | 2 + 8 | 2 + 8 | 2 + 8 | 10 | 32 |
| Instructie voorspelling | |||||
| Inhoud invoer registers | |||||
| Tijdelijke registers | 12 | 22 | 32 | 32 | 4096 |
| vaste registers | 32 | 32 | 32 | 224 | 16x4096 |
| Arbitrary swizzling | |||||
| Gradient instructions | |||||
| Loop teller register | |||||
| gezicht register (2-sided lighting) | |||||
| Dynamische volgcontrole | 24 | ||||
| Bitwise Operators | |||||
| Native Integers |
- PS_2_0 = DirectX 9.0 originele Shader Model 2 specificatie.
- PS_2_a = NVIDIA GeForce FX-geoptimaliseerd model.
- PS_2_b = ATI Radeon X700, X800, X850 shader model, DirectX 9.0b.
- PS_3_0 = Shader Model 3.
- PS_4_0 = Shader Model 4.
"32 + 64" voor Executed Instructions betekent "32 texture instructies en 64 arithmetic instructies."
Vertex shader comparison
| VS_2_0 | VS_2_a | VS_3_0[1] | VS_4_0[2] | |
|---|---|---|---|---|
| # van instructies slots | 256 | 256 | ≥ 512 | 4096 |
| Max # van instructies uitvoering | 65536 | 65536 | 65536 | 65536 |
| Instructie Predicatie | ||||
| Tijdelijke Registers | 12 | 13 | 32 | 4096 |
| # constant registers | ≥ 256 | ≥ 256 | ≥ 256 | 16x4096 |
| Static Flow Control | ||||
| Dynamic Flow Control | ||||
| Dynamische volgcontrole Diepte | 24 | 24 | ||
| Vertex Texture Fetch | KA | |||
| # of texture samplers | N/A | N/A | 4 | 128 |
| Geometry instancing ondersteuning | ||||
| Bitwise Operators | ||||
| Native Integers |
- VS_2_0 = DirectX 9.0 originele Shader Model 2 specificatie.
- VS_2_a = NVIDIA GeForce FX-geoptimaliseerd model.
- VS_3_0 = Shader Model 3.
- VS_4_0 = Shader Model 4.
Content Disclaimer
Informasi ini disarikan dari Wikipedia dan disajikan kembali untuk tujuan edukasi. Konten tersedia di bawah lisensi CC BY-SA 3.0. Kami tidak bertanggung jawab atas ketidakakuratan data yang bersumber dari kontribusi publik tersebut.
- The information displayed on this website is sourced in part or in whole from Wikipedia and has been adapted for the purpose of restating it. We strive to provide accurate and relevant information, however:
- There is no guarantee of absolute accuracy. Wikipedia is an open, collaborative project that can be edited by anyone, so information is subject to change.
- It is not intended to constitute professional advice. The content displayed is for informational and educational purposes only. For important decisions (e.g., medical, legal, or financial), please consult a professional.
- Content copyright. Wikipedia is licensed under the Creative Commons Attribution-ShareAlike License (CC BY-SA). This means that content may be reused with appropriate attribution and shared under a similar license.
- Responsible use. Any risk arising from the use of information from this website is entirely the responsibility of the user.