1struct os { 2 sampler2D s2D; 3}; 4 5struct os2 { 6 sampler2D s2D; 7 Texture2D tex; 8}; 9 10Texture2D tex; 11os s; 12os2 s2; 13 14float4 osCall1(os s) 15{ 16 return tex.Sample(s.s2D, float2(0.2, 0.3)); 17} 18 19float4 osCall2(os s, float2 f2) 20{ 21 return tex.Sample(s.s2D, f2); 22} 23 24float4 os2Call1(os2 s) 25{ 26 return s.tex.Sample(s.s2D, float2(0.2, 0.3)); 27} 28 29float4 os2Call2(os2 s, float2 f2) 30{ 31 return s.tex.Sample(s.s2D, f2); 32} 33 34float4 main() : SV_TARGET0 35{ 36 return osCall1(s) + 37 osCall2(s, float2(0.2, 0.3)) + 38 os2Call1(s2) + 39 os2Call2(s2, float2(0.2, 0.3)); 40} 41