Get rid of some srgb conversion in shader, see #2787
This commit is contained in:
@@ -23,7 +23,6 @@ void main(void)
|
||||
#endif
|
||||
#endif
|
||||
vec4 detail = texture(Detail, uv_bis);
|
||||
detail.xyz = pow(detail.xyz, vec3(2.2));
|
||||
detail.rgb = detail.a * detail.rgb;
|
||||
color.rgb = detail.rgb + color.rgb * (1. - detail.a);
|
||||
float specmap = texture(SpecMap, uv).g;
|
||||
|
||||
@@ -29,7 +29,6 @@ void main(void)
|
||||
vec4 detail = texture(Detail, uv_bis);
|
||||
float specmap = texture(SpecMap, uv).g;
|
||||
#endif
|
||||
detail.xyz = pow(detail.xyz, vec3(2.2));
|
||||
detail.rgb = detail.a * detail.rgb;
|
||||
color.rgb = detail.rgb + color.rgb * (1. - detail.a);
|
||||
FragColor = vec4(getLightFactor(color.xyz, vec3(1.), specmap, 0.), 1.);
|
||||
|
||||
@@ -1,19 +1,6 @@
|
||||
// SuperTuxKart - a fun racing game with go-kart
|
||||
// Copyright (C) 2017 SuperTuxKart-Team
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU General Public License
|
||||
// as published by the Free Software Foundation; either version 3
|
||||
// of the License, or (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program; if not, write to the Free Software
|
||||
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
// Copyright (C) 2002-2012 Nikolaus Gebhardt
|
||||
// This file is part of the "Irrlicht Engine".
|
||||
// For conditions of distribution and use, see copyright notice in irrlicht.h
|
||||
|
||||
#include "graphics/stk_mesh_loader.hpp"
|
||||
#include "graphics/stk_tex_manager.hpp"
|
||||
@@ -1059,7 +1046,7 @@ void STKMeshLoader::loadTextures(SB3dMaterial& material) const
|
||||
|
||||
video::ITexture* tex =
|
||||
STKTexManager::getInstance()->getTexture(full_path.c_str(),
|
||||
i == 0 ? true : false/*is_srgb*/, false/*premul_alpha*/,
|
||||
i <= 1 ? true : false/*is_srgb*/, false/*premul_alpha*/,
|
||||
true/*set_material*/);
|
||||
|
||||
material.Material.setTexture(i, tex);
|
||||
|
||||
@@ -1,19 +1,6 @@
|
||||
// SuperTuxKart - a fun racing game with go-kart
|
||||
// Copyright (C) 2017 SuperTuxKart-Team
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU General Public License
|
||||
// as published by the Free Software Foundation; either version 3
|
||||
// of the License, or (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program; if not, write to the Free Software
|
||||
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
// Copyright (C) 2002-2012 Nikolaus Gebhardt
|
||||
// This file is part of the "Irrlicht Engine".
|
||||
// For conditions of distribution and use, see copyright notice in irrlicht.h
|
||||
|
||||
#ifndef HEADER_STK_MESH_LOADER_HPP
|
||||
#define HEADER_STK_MESH_LOADER_HPP
|
||||
|
||||
Reference in New Issue
Block a user