tileable flags are needed also without shaders because of filters
authorRealBadAngel <maciej.kasatkin@o2.pl>
Thu, 20 Aug 2015 01:39:26 +0000 (03:39 +0200)
committerest31 <MTest31@outlook.com>
Thu, 20 Aug 2015 01:42:22 +0000 (03:42 +0200)
src/client/tile.h

index 3098a79b934bea2d0c39b4336b93b50b7d4a5637..7796e801d75bb7cbdc48f154a4fa9c5f3ddb3ece 100644 (file)
@@ -250,6 +250,12 @@ struct TileSpec
                }
                material.BackfaceCulling = (material_flags & MATERIAL_FLAG_BACKFACE_CULLING)
                        ? true : false;
+               if (!(material_flags & MATERIAL_FLAG_TILEABLE_HORIZONTAL)) {
+                       material.TextureLayer[0].TextureWrapU = video::ETC_CLAMP_TO_EDGE;
+               }
+               if (!(material_flags & MATERIAL_FLAG_TILEABLE_VERTICAL)) {
+                       material.TextureLayer[0].TextureWrapV = video::ETC_CLAMP_TO_EDGE;
+               }
        }
 
        void applyMaterialOptionsWithShaders(video::SMaterial &material) const