undo nearest neighbor

This commit is contained in:
Tyler Murphy 2022-09-26 14:08:40 -04:00
parent 8852ce1af9
commit 7332c3e56a
3 changed files with 7 additions and 6 deletions

View file

@ -223,9 +223,9 @@ void Image::createTextureSampler() {
samplerInfo.sType = VK_STRUCTURE_TYPE_SAMPLER_CREATE_INFO; samplerInfo.sType = VK_STRUCTURE_TYPE_SAMPLER_CREATE_INFO;
samplerInfo.magFilter = VK_FILTER_LINEAR; samplerInfo.magFilter = VK_FILTER_LINEAR;
samplerInfo.minFilter = VK_FILTER_LINEAR; samplerInfo.minFilter = VK_FILTER_LINEAR;
samplerInfo.addressModeU = VK_SAMPLER_ADDRESS_MODE_REPEAT; samplerInfo.addressModeU = VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE;
samplerInfo.addressModeV = VK_SAMPLER_ADDRESS_MODE_REPEAT; samplerInfo.addressModeV = VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE;
samplerInfo.addressModeW = VK_SAMPLER_ADDRESS_MODE_REPEAT; samplerInfo.addressModeW = VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE;
samplerInfo.anisotropyEnable = VK_TRUE; samplerInfo.anisotropyEnable = VK_TRUE;
samplerInfo.maxAnisotropy = xeDevice.getAnisotropy(); samplerInfo.maxAnisotropy = xeDevice.getAnisotropy();
samplerInfo.borderColor = VK_BORDER_COLOR_INT_OPAQUE_BLACK; samplerInfo.borderColor = VK_BORDER_COLOR_INT_OPAQUE_BLACK;

BIN
res/image/blocks.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.3 KiB

View file

@ -14,6 +14,7 @@
#define INVALID 0 #define INVALID 0
#define AIR 1 #define AIR 1
#define DIRT 2 #define DIRT 2
#define GRASS 3
namespace app { namespace app {
@ -110,12 +111,12 @@ const float nm[6][3] = {
const float uv[6][2] = { const float uv[6][2] = {
{1.f,0.f},
{1.f,1.f}, {1.f,1.f},
{0.f,1.f}, {0.f,1.f},
{0.f,1.f},
{0.f,0.f}, {0.f,0.f},
{0.f,0.f}, {1.f,0.f}
{1.f,0.f},
{1.f,1.f}
}; };
} }