From f880ada633fc52b1006503054405dd595cbf1ed4 Mon Sep 17 00:00:00 2001 From: Alexei Kotov Date: Sat, 13 Apr 2024 00:06:24 +0300 Subject: [PATCH] Don't flip the water normal map twice --- apps/openmw/mwrender/water.cpp | 2 -- files/shaders/compatibility/water.frag | 1 - 2 files changed, 3 deletions(-) diff --git a/apps/openmw/mwrender/water.cpp b/apps/openmw/mwrender/water.cpp index a28ca0b7b7..cbc560d5ac 100644 --- a/apps/openmw/mwrender/water.cpp +++ b/apps/openmw/mwrender/water.cpp @@ -715,8 +715,6 @@ namespace MWRender osg::ref_ptr normalMap( new osg::Texture2D(mResourceSystem->getImageManager()->getImage("textures/omw/water_nm.png"))); - if (normalMap->getImage()) - normalMap->getImage()->flipVertical(); normalMap->setWrap(osg::Texture::WRAP_S, osg::Texture::REPEAT); normalMap->setWrap(osg::Texture::WRAP_T, osg::Texture::REPEAT); normalMap->setMaxAnisotropy(16); diff --git a/files/shaders/compatibility/water.frag b/files/shaders/compatibility/water.frag index d1324e01bd..749dcf27cd 100644 --- a/files/shaders/compatibility/water.frag +++ b/files/shaders/compatibility/water.frag @@ -94,7 +94,6 @@ uniform vec2 screenRes; void main(void) { vec2 UV = worldPos.xy / (8192.0*5.0) * 3.0; - UV.y *= -1.0; float shadow = unshadowedLightRatio(linearDepth);