简体   繁体   中英

In an AGAL Vertex Shader, what is the 'w' component used for in the output shader?

I understand the 'xyz' components of a vertex's position, but what does 'w' do? Could it be left as the same constant value all the time?

Example:

mov op.xyz, va0.xyz
mov op.w vc0.w

I'm not familiar with flash, but it seems that you are dealing with homogeneous coordinates . If you are only dealing with vertices, it should be fine to leave it as 1.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM