Click to Rate and Give Feedback
MSDN
MSDN Library
DirectX
SDK Documentation
DirectX Graphics
HLSL
Reference
Shader Models
Shader Model 4

  Switch on low bandwidth view
Shader Model 4
Bb509657.XDK_CHM_BANNER_left(en-us,VS.85).jpgBb509657.XDK_CHM_BANNER_right(en-us,VS.85).jpg

Shader Model 4

Shader Model 4 is a superset of the capabilites in shader model 3 with the exception that shader model 4 does not support the features in shader model 1. It has been designed using a common-shader core which provides a common set of features to all programmable shaders, which are only programmable using HLSL.

FeatureCapability
Instruction SetHLSL functions
Register SetThe register set is accessible through members in constant and texture buffers using HLSL semantics for things like component packing.
Vertex Shader MaxNo restriction
Pixel Shader MaxNo restriction
New Shader Profiles Addedgs_4_0, ps_4_0, vs_4_0, gs_4_1*, ps_4_1*, gs_4_1*
New Effect-Framework Profile Addedfx_4_0, fx_4_1*

* - gs_4_1, ps_4_1, vs_4_1 and fx_4_1 are supported on Direct3D 10.1 or higher.

Shader model 4 supports a new pipeline stage -- the geometry-shader stage -- which can be used to create or modify existing geometry. It also includes two new object types: a stream-output object designed for streaming data out of the geometry stage, and a templated texture object that implements texture sampling functions.

Packing Rules for Constant Variables (DirectX HLSL)

Shader Model 4 Assembly (DirectX HLSL)

See Also

Shader Models vs Shader Profiles

© 2009 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker