private static unsafe void LoadPixelsShaders() { var shaderNormalPath = Settings.ShadersPath + "normal.ps"; var shaderGrayScalePath = Settings.ShadersPath + "grayscale.ps"; var shaderMagicPath = Settings.ShadersPath + "magic.ps"; if (System.IO.File.Exists(shaderNormalPath)) { using (var gs = ShaderBytecode.AssembleFromFile(shaderNormalPath, ShaderFlags.None)) NormalPixelShader = new PixelShader(Device, gs); } if (System.IO.File.Exists(shaderGrayScalePath)) { using (var gs = ShaderBytecode.AssembleFromFile(shaderGrayScalePath, ShaderFlags.None)) GrayScalePixelShader = new PixelShader(Device, gs); } if (System.IO.File.Exists(shaderMagicPath)) { using (var gs = ShaderBytecode.AssembleFromFile(shaderMagicPath, ShaderFlags.None)) MagicPixelShader = new PixelShader(Device, gs); } }