2016-07-13 02:44:32 +00:00
|
|
|
struct PS_OUTPUT
|
|
|
|
{
|
|
|
|
float4 Color : SV_Target0;
|
|
|
|
float Depth : SV_Depth;
|
|
|
|
};
|
|
|
|
|
2017-06-20 05:49:22 +00:00
|
|
|
inline void MyFunc(in float x, out float y, inout float z, in out float w)
|
2016-07-13 02:44:32 +00:00
|
|
|
{
|
|
|
|
y = x;
|
|
|
|
z = y;
|
|
|
|
x = -1; // no effect since x = in param
|
2017-06-20 05:49:22 +00:00
|
|
|
w *= 1;
|
2016-07-13 02:44:32 +00:00
|
|
|
}
|
|
|
|
|
2016-10-16 18:12:11 +00:00
|
|
|
PS_OUTPUT main(noperspective in float4 inpos : SV_Position, out int sampleMask : SV_Coverage)
|
2016-07-13 02:44:32 +00:00
|
|
|
{
|
|
|
|
PS_OUTPUT psout;
|
|
|
|
|
|
|
|
float x = 7, y, z = 3;
|
2017-06-20 05:49:22 +00:00
|
|
|
MyFunc(x, y, z, inpos.w);
|
2016-07-13 02:44:32 +00:00
|
|
|
|
|
|
|
psout.Color = float4(x, y, z, 1);
|
|
|
|
psout.Depth = inpos.w;
|
|
|
|
|
|
|
|
return psout;
|
|
|
|
}
|