Fix inverted conditions in shader.cpp
authorLoic Blot <loic.blot@unix-experience.fr>
Tue, 9 Feb 2016 22:46:20 +0000 (23:46 +0100)
committerLoic Blot <loic.blot@unix-experience.fr>
Tue, 9 Feb 2016 22:50:37 +0000 (23:50 +0100)
src/shader.cpp

index 138ad2aacb5e5e224883adce928e3ff09ca9c025..d39a8307c632e11a1f3098f329c3f0e33daf05c3 100644 (file)
@@ -772,11 +772,11 @@ ShaderInfo generate_shader(std::string name, u8 material_type, u8 drawtype,
        const c8* pixel_program_ptr = 0;
        const c8* geometry_program_ptr = 0;
        if (!vertex_program.empty()) {
-               pixel_program = shaders_header + pixel_program;
+               vertex_program = shaders_header + vertex_program;
                vertex_program_ptr = vertex_program.c_str();
        }
        if (!pixel_program.empty()) {
-               vertex_program = shaders_header + vertex_program;
+               pixel_program = shaders_header + pixel_program;
                pixel_program_ptr = pixel_program.c_str();
        }
        if (!geometry_program.empty()) {