Shader error in 'xxx': Arithmetic instruction limit of 64 exceeded....的解决方法

来源:互联网 发布:8051 单片机内部实现 编辑:程序博客网 时间:2024/05/18 06:24

Shader error in 'xxx': Arithmetic instruction limit of 64 exceeded; 65 arithmetic instructions needed to compile program


需要定义#pragma target 3.0


  • #pragma target 2.0 (default) - roughly shader model 2.0
    • Shader Model 2.0 on Direct3D 9.
    • Limited amount of arithmetic & texture instructions; no vertex texture sampling; no derivatives in fragment shaders.
  • #pragma target 3.0 - compile to shader model 3.0:
    • Shader Model 3.0 on Direct3D 9.
  • #pragma target 4.0 - compile to DX10 shader model 4.0. This target is currently only supported by DirectX 11 and XboxOne/PS4 platforms.
  • #pragma target 5.0 - compile to DX11 shader model 5.0. This target is currently only supported by DirectX 11 and XboxOne/PS4 platforms.

0 0