aboutsummaryrefslogtreecommitdiff
path: root/games/minimal/mods/default/textures/default_nc_rb.png
diff options
context:
space:
mode:
authorWren Turkal <wt@penguintechs.org>2020-04-06 07:06:16 -0700
committerGitHub <noreply@github.com>2020-04-06 16:06:16 +0200
commitf91124a0c0d8c448b3d3d0767b3c8b2352c92d6e (patch)
tree6dac4ff308edcedecb8efe88f9cfcb6fe968b35d /games/minimal/mods/default/textures/default_nc_rb.png
parentfaedde08f96b671078d9d3273da468db3454713c (diff)
downloadminetest-f91124a0c0d8c448b3d3d0767b3c8b2352c92d6e.tar.gz
minetest-f91124a0c0d8c448b3d3d0767b3c8b2352c92d6e.tar.bz2
minetest-f91124a0c0d8c448b3d3d0767b3c8b2352c92d6e.zip
Add allowed_mapgens option in game.conf. (#9263)
The game.conf has a disallowed_mapgens option. However, some games require a certain mapgen to be used, like the CTF plugin. This change adds an option to specify allowed mapgens so that the setting can be specified in a way that needn't be updated as map generators are added to Minetest.
Diffstat (limited to 'games/minimal/mods/default/textures/default_nc_rb.png')
0 files changed, 0 insertions, 0 deletions
om"> You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #include "interlaced.h" #include "client/client.h" #include "client/shader.h" #include "client/tile.h" RenderingCoreInterlaced::RenderingCoreInterlaced( IrrlichtDevice *_device, Client *_client, Hud *_hud) : RenderingCoreStereo(_device, _client, _hud) { initMaterial(); } void RenderingCoreInterlaced::initMaterial() { IShaderSource *s = client->getShaderSource(); mat.UseMipMaps = false; mat.ZBuffer = false; mat.ZWriteEnable = false; u32 shader = s->getShader("3d_interlaced_merge", TILE_MATERIAL_BASIC, 0); mat.MaterialType = s->getShaderInfo(shader).material; for (int k = 0; k < 3; ++k) { mat.TextureLayer[k].AnisotropicFilter = false; mat.TextureLayer[k].BilinearFilter = false; mat.TextureLayer[k].TrilinearFilter = false; mat.TextureLayer[k].TextureWrapU = video::ETC_CLAMP_TO_EDGE; mat.TextureLayer[k].TextureWrapV = video::ETC_CLAMP_TO_EDGE; } } void RenderingCoreInterlaced::initTextures() { v2u32 image_size{screensize.X, screensize.Y / 2}; left = driver->addRenderTargetTexture( image_size, "3d_render_left", video::ECF_A8R8G8B8); right = driver->addRenderTargetTexture( image_size, "3d_render_right", video::ECF_A8R8G8B8); mask = driver->addTexture(screensize, "3d_render_mask", video::ECF_A8R8G8B8); initMask(); mat.TextureLayer[0].Texture = left; mat.TextureLayer[1].Texture = right; mat.TextureLayer[2].Texture = mask; } void RenderingCoreInterlaced::clearTextures() { driver->removeTexture(left); driver->removeTexture(right); driver->removeTexture(mask); } void RenderingCoreInterlaced::initMask() { u8 *data = reinterpret_cast<u8 *>(mask->lock()); for (u32 j = 0; j < screensize.Y; j++) { u8 val = j % 2 ? 0xff : 0x00; memset(data, val, 4 * screensize.X); data += 4 * screensize.X; } mask->unlock(); } void RenderingCoreInterlaced::drawAll() { renderBothImages(); merge(); drawHUD(); } void RenderingCoreInterlaced::merge() { static const video::S3DVertex vertices[4] = { video::S3DVertex(1.0, -1.0, 0.0, 0.0, 0.0, -1.0, video::SColor(255, 0, 255, 255), 1.0, 0.0), video::S3DVertex(-1.0, -1.0, 0.0, 0.0, 0.0, -1.0, video::SColor(255, 255, 0, 255), 0.0, 0.0), video::S3DVertex(-1.0, 1.0, 0.0, 0.0, 0.0, -1.0, video::SColor(255, 255, 255, 0), 0.0, 1.0),