error X3000: Illegal character in shader file

后端 未结 1 1641
眼角桃花
眼角桃花 2021-01-18 09:04

I pasted a line of shader code from SO and now my project refuses to work.

  • I removed the tainted line of code.

  • I\'ve re-written the shader m

相关标签:
1条回答
  • 2021-01-18 10:04

    It was an encoding problem. When I pasted the line of code it somehow made my compiler treat every text file as UNICODE instead of ASCII. This caused the problem.
    The solution was opening the shader file in Visual Studio and go to
    File->Save as->Save with Encoding and then choose the correct format and rebuild the solution.

    0 讨论(0)
提交回复
热议问题