PS 3.0 position register

ram

Newcomer
The Position Register allows shader programs to access the x/y position of the current pixel on the screen.

Can someone enlight me why this is specified as a 4 dimension register when you at the end only can read two defined values :?:

What would be a nice application for this register in the PS?
 
Actually ps3.0 only provides the x,y screen position, not the z or 1/w. In OpenGL with ARB_fragment_program or GLSL you get all four values.

From the DX9 docs:

The Position Register (vPos) is new for this model. It contains the current pixels (x, y) in the corresponding channels. The (z, w) channels are undefined.
 
Independent of OGL it doesn't make sense to only define x/y IMO.

Nevertheless, what would be a userfull effect that is based on the screen position? May be some full screen effects?
 
ram said:
Nevertheless, what would be a userfull effect that is based on the screen position? May be some full screen effects?

it's extremely useful for planar reflection/refraction effects..
 
Back
Top