Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

GraphicsDevice.SetPixelShaderConstant Method (Int32, Vector2)

Sets the specified pixel shader constant float register to a Vector2 value.

Namespace: Microsoft.Xna.Framework.Graphics
Assembly: Microsoft.Xna.Framework (in microsoft.xna.framework.dll)

public void SetPixelShaderConstant (
         int startRegister,
         Vector2 constantData
)

Parameters

startRegister
Zero-based index of the pixel shader constant float register at which to begin setting values.
constantData
The constant data.

Because the data in the Vector2 type is not large enough to fill the constant float register, the constant data will be padded to fill the register. This means that setting register 0 to a Vector2 containing (1,2) will fill the register with (1,2,0,0).

Exception typeCondition
ArgumentOutOfRangeException constantData is outside the allowable range of values as defined by the invoked method.
InvalidOperationException The method call is invalid. For example, a method's parameter may have an invalid value.

Xbox 360, Windows XP SP2, Windows Vista

Show:
© 2015 Microsoft