diff --git a/android/texturemipmapgen/build.bat b/android/texturemipmapgen/build.bat
index 4f2540ca..3729f3f0 100644
--- a/android/texturemipmapgen/build.bat
+++ b/android/texturemipmapgen/build.bat
@@ -10,7 +10,7 @@ if %ERRORLEVEL% EQU 0 (
xcopy "..\..\data\shaders\texturemipmapgen\*.spv" "assets\shaders\texturemipmapgen" /Y
mkdir "assets\textures"
- xcopy "..\..\data\textures\checkerboard_nomips_rgba.ktx" "assets\textures" /Y
+ xcopy "..\..\data\textures\metalplate_nomips_rgba.ktx" "assets\textures" /Y
mkdir "assets\models"
xcopy "..\..\data\models\tunnel.dae" "assets\models" /Y
diff --git a/data/models/tunnel.dae b/data/models/tunnel.dae
index 92b14ad3..8dab8ce1 100644
--- a/data/models/tunnel.dae
+++ b/data/models/tunnel.dae
@@ -5,102 +5,11 @@
Blender User
Blender 2.77.0 commit date:2016-03-18, commit time:12:34, hash:22a2853
- 2016-08-14T23:02:23
- 2016-08-14T23:02:23
+ 2016-09-03T22:18:11
+ 2016-09-03T22:18:11
Z_UP
-
-
-
-
-
- 49.13434
- 1.777778
- 0.1
- 100
-
-
-
-
-
- 0
- 0
- 0
-
-
-
-
-
-
-
-
- 1 1 1
- 1
- 0
- 0.00111109
-
-
-
-
- 0.000999987
- 1
- 0.1
- 0.1
- 1
- 1
- 1
- 2
- 0
- 1
- 1
- 1
- 1
- 1
- 0
- 2880
- 2
- 30.002
- 1.000799
- 0.04999995
- 29.99998
- 1
- 2
- 0
- 0
- 1
- 1
- 1
- 1
- 8192
- 1
- 1
- 0
- 1
- 1
- 1
- 3
- 0
- 0
- 0
- 0
- 0
- 1
- 1
- 1
- 3
- 0.15
- 75
- 1
- 1
- 0
- 1
- 1
- 0
-
-
-
-
@@ -183,16 +92,8 @@
-
- 0.6858805 -0.3173701 0.6548619 7.481132 0.7276338 0.3124686 -0.6106656 -6.50764 -0.01081678 0.8953432 0.4452454 5.343665 0 0 0 1
-
-
-
- -0.2908646 -0.7711008 0.5663932 4.076245 0.9551712 -0.1998834 0.2183912 1.005454 -0.05518906 0.6045247 0.7946723 5.903862 0 0 0 1
-
-
- 10 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1
+ 40 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1
diff --git a/data/shaders/texturemipmapgen/texture.vert b/data/shaders/texturemipmapgen/texture.vert
index 955ee136..9cdbd522 100644
--- a/data/shaders/texturemipmapgen/texture.vert
+++ b/data/shaders/texturemipmapgen/texture.vert
@@ -27,8 +27,7 @@ out gl_PerVertex
void main()
{
- outUV = inUV;
- outUV.s *= 10.0;
+ outUV = inUV * vec2(50.0, 2.0);
outLodBias = ubo.lodBias;
outSamplerIndex = ubo.samplerIndex;
gl_Position = ubo.projection * ubo.view * ubo.model * vec4(inPos, 1.0);
diff --git a/data/shaders/texturemipmapgen/texture.vert.spv b/data/shaders/texturemipmapgen/texture.vert.spv
index 74cbb774..37b01b50 100644
Binary files a/data/shaders/texturemipmapgen/texture.vert.spv and b/data/shaders/texturemipmapgen/texture.vert.spv differ
diff --git a/data/textures/metalplate_nomips_rgba.ktx b/data/textures/metalplate_nomips_rgba.ktx
new file mode 100644
index 00000000..99067cc2
Binary files /dev/null and b/data/textures/metalplate_nomips_rgba.ktx differ
diff --git a/texturemipmapgen/texturemipmapgen.cpp b/texturemipmapgen/texturemipmapgen.cpp
index adefc2c6..23ce4319 100644
--- a/texturemipmapgen/texturemipmapgen.cpp
+++ b/texturemipmapgen/texturemipmapgen.cpp
@@ -83,9 +83,9 @@ public:
title = "Vulkan Example - Runtime mip map generation";
enableTextOverlay = true;
camera.type = Camera::CameraType::firstperson;
- camera.setPerspective(60.0f, (float)width / (float)height, 0.1f, 512.0f);
+ camera.setPerspective(60.0f, (float)width / (float)height, 0.1f, 1024.0f);
camera.setRotation(glm::vec3(0.0f, 90.0f, 0.0f));
- camera.setTranslation(glm::vec3(10.75f, 0.0f, 0.0f));
+ camera.setTranslation(glm::vec3(40.75f, 0.0f, 0.0f));
camera.movementSpeed = 2.5f;
camera.rotationSpeed = 0.5f;
timerSpeed *= 0.05f;
@@ -312,9 +312,9 @@ public:
sampler.magFilter = VK_FILTER_LINEAR;
sampler.minFilter = VK_FILTER_LINEAR;
sampler.mipmapMode = VK_SAMPLER_MIPMAP_MODE_LINEAR;
- sampler.addressModeU = VK_SAMPLER_ADDRESS_MODE_REPEAT;
- sampler.addressModeV = VK_SAMPLER_ADDRESS_MODE_REPEAT;
- sampler.addressModeW = VK_SAMPLER_ADDRESS_MODE_REPEAT;
+ sampler.addressModeU = VK_SAMPLER_ADDRESS_MODE_MIRRORED_REPEAT;
+ sampler.addressModeV = VK_SAMPLER_ADDRESS_MODE_MIRRORED_REPEAT;
+ sampler.addressModeW = VK_SAMPLER_ADDRESS_MODE_MIRRORED_REPEAT;
sampler.mipLodBias = 0.0f;
sampler.compareOp = VK_COMPARE_OP_NEVER;
sampler.minLod = 0.0f;
@@ -424,7 +424,7 @@ public:
void loadAssets()
{
loadMesh(getAssetPath() + "models/tunnel.dae", &meshes.tunnel, vertexLayout, 1.0f);
- loadTexture(getAssetPath() + "textures/checkerboard_nomips_rgba.ktx", VK_FORMAT_R8G8B8A8_UNORM, false);
+ loadTexture(getAssetPath() + "textures/metalplate_nomips_rgba.ktx", VK_FORMAT_R8G8B8A8_UNORM, false);
}
void setupVertexDescriptions()
@@ -664,10 +664,7 @@ public:
{
uboVS.projection = camera.matrices.perspective;
uboVS.view = camera.matrices.view;
- if (!paused)
- {
- uboVS.model = glm::rotate(glm::mat4(), glm::radians(timer * 360.0f), glm::vec3(1.0f, 0.0f, 0.0f));
- }
+ uboVS.model = glm::rotate(glm::mat4(), glm::radians((timer + 45.0f/360.0f) * 360.0f), glm::vec3(1.0f, 0.0f, 0.0f));
VK_CHECK_RESULT(uniformBufferVS.map());
memcpy(uniformBufferVS.mapped, &uboVS, sizeof(uboVS));
uniformBufferVS.unmap();