soconne
11-06-2003, 08:43 AM
How do you access the z value of an incoming pixel in CG?
jra101
11-06-2003, 08:50 AM
Bind an input float4 variable to WPOS and access the z portion.
Here's an example:
float4 main(in float4 wpos : WPOS) : COLOR
{
return wpos.z;
}
Powered by vBulletin® Version 4.2.0 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.