Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

[Feature Request] Write Shaders in C#

Discussion in 'General Graphics' started by jjxtra, Jul 20, 2021.

  1. jjxtra

    jjxtra

    Joined:
    Aug 30, 2013
    Posts:
    1,464
    Being able to write shaders in C# would be very helpful. This would make sharing of business logic from C# code and shaders much easier, and even allow tests to be written against shaders.

    Perhaps the burst compiler or some subset of C# code and types could be used or restricted for these special C# shader files.

    There is a library on github that shows it can be done: https://github.com/mellinoe/ShaderGen.

    Thanks for listening.