Position Register
This vertex shader output register contains per-vertex position data.
Vertex shader versions | 1_1 | 2_0 | 2_sw | 2_x | 3_0 | 3_sw |
---|---|---|---|---|---|---|
Position Register | x | x | x | x | x | x |
A register consists of properties that determine how each register behaves.
Property | Description |
---|---|
Name | oPos |
Count | 1 vector |
I/O permissions | Write-only. |
The value is the position in homogeneous clipping space. This value must be written by the vertex shader.
Example
dcl_position v0
def c40, 0.0f,0.0f,0.0f,0.0f;
// transform into projection space
m4x4 r0,v0,c8
max r0.z,c40.z,r0.z //clamp to 0
max r0.w,c12.x,r0.w //clamp to near clip plane
mov oPos,r0
Related topics
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for