diff --git a/modules/shader_compiler/src/vkcv/shader/GLSLCompiler.cpp b/modules/shader_compiler/src/vkcv/shader/GLSLCompiler.cpp index 8418eff7e7e4d7c6c07108a0f663b7759734bd64..7214e208b068ba7b9002363e594f76d66123bffd 100644 --- a/modules/shader_compiler/src/vkcv/shader/GLSLCompiler.cpp +++ b/modules/shader_compiler/src/vkcv/shader/GLSLCompiler.cpp @@ -177,7 +177,7 @@ namespace vkcv::shader { } static bool writeSpirvCode(const std::filesystem::path &shaderPath, const std::vector<uint32_t>& spirv) { - std::ofstream file (shaderPath.string(), std::ios::out); + std::ofstream file (shaderPath.string(), std::ios::out | std::ios::binary); if (!file.is_open()) { vkcv_log(LogLevel::ERROR, "The file could not be opened (%s)", shaderPath.string().c_str());