Shader.FromHLSL

static Shader FromHLSL(string hlsl)

   
string hlsl A vertex and pixel shader written in HLSL, check the shader guides for more on this later!
RETURNS: Shader A shader from the given code, or null if it failed to load/compile.

Creates a shader from a piece of HLSL code! Shader stuff like this may change in the future, since HLSL may not be all that portable. Also, before compiling the shader code, StereoKit hashes the contents, and looks to see if it has that shader cached. If so, it’ll just load that instead of compiling it again. The Id will be the shader’s internal name.