hlsl.memberFunCall.frag 403 B

1234567891011121314151617
  1. float method3(float a) { return 1.0; }
  2. struct myContext {
  3. float method1() { return method2(); }
  4. float method2() { return method3(1.0); }
  5. float method3(float a) { return method4(a, a); }
  6. float method4(float a, float b) { return a + b + f; }
  7. float f;
  8. };
  9. float4 main() : SV_TARGET0
  10. {
  11. myContext context;
  12. context.f = 3.0;
  13. return (float4)context.method1();
  14. }