From 06c23ba755d55205c66c47a397da32b1e3154371 Mon Sep 17 00:00:00 2001
From: Tobias Frisch <tfrisch@uni-koblenz.de>
Date: Sat, 21 Aug 2021 18:29:29 +0200
Subject: [PATCH] [#106] Return to basics

Signed-off-by: Tobias Frisch <tfrisch@uni-koblenz.de>
---
 .../resources/models/{Grid.png => grid.png}   |   0
 .../resources/models/ground.gltf              | 137 +++++++++++++++++-
 projects/indirect_dispatch/src/App.cpp        |   2 +-
 projects/indirect_dispatch/src/MotionBlur.cpp |   2 +
 4 files changed, 137 insertions(+), 4 deletions(-)
 rename projects/indirect_dispatch/resources/models/{Grid.png => grid.png} (100%)

diff --git a/projects/indirect_dispatch/resources/models/Grid.png b/projects/indirect_dispatch/resources/models/grid.png
similarity index 100%
rename from projects/indirect_dispatch/resources/models/Grid.png
rename to projects/indirect_dispatch/resources/models/grid.png
diff --git a/projects/indirect_dispatch/resources/models/ground.gltf b/projects/indirect_dispatch/resources/models/ground.gltf
index 84c21004..6816da0f 100644
--- a/projects/indirect_dispatch/resources/models/ground.gltf
+++ b/projects/indirect_dispatch/resources/models/ground.gltf
@@ -1,3 +1,134 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:e49f29edbbf3a2e3b8ab7200979054e2c3474c75170a54b98f1ca369d755d08e
-size 2840
+{
+    "asset" : {
+        "generator" : "Khronos glTF Blender I/O v1.4.40",
+        "version" : "2.0"
+    },
+    "scene" : 0,
+    "scenes" : [
+        {
+            "name" : "Scene",
+            "nodes" : [
+                0
+            ]
+        }
+    ],
+    "nodes" : [
+        {
+            "mesh" : 0,
+            "name" : "Plane"
+        }
+    ],
+    "materials" : [
+        {
+            "doubleSided" : true,
+            "name" : "Material.002",
+            "pbrMetallicRoughness" : {
+                "baseColorTexture" : {
+                    "index" : 0,
+                    "texCoord" : 0
+                },
+                "metallicFactor" : 0,
+                "roughnessFactor" : 0.4000000059604645
+            }
+        }
+    ],
+    "meshes" : [
+        {
+            "name" : "Plane",
+            "primitives" : [
+                {
+                    "attributes" : {
+                        "POSITION" : 0,
+                        "NORMAL" : 1,
+                        "TEXCOORD_0" : 2
+                    },
+                    "indices" : 3,
+                    "material" : 0
+                }
+            ]
+        }
+    ],
+    "textures" : [
+        {
+            "sampler" : 0,
+            "source" : 0
+        }
+    ],
+    "images" : [
+        {
+            "mimeType" : "image/png",
+            "name" : "grid",
+            "uri" : "grid.png"
+        }
+    ],
+    "accessors" : [
+        {
+            "bufferView" : 0,
+            "componentType" : 5126,
+            "count" : 4,
+            "max" : [
+                5,
+                0,
+                5
+            ],
+            "min" : [
+                -5,
+                0,
+                -5
+            ],
+            "type" : "VEC3"
+        },
+        {
+            "bufferView" : 1,
+            "componentType" : 5126,
+            "count" : 4,
+            "type" : "VEC3"
+        },
+        {
+            "bufferView" : 2,
+            "componentType" : 5126,
+            "count" : 4,
+            "type" : "VEC2"
+        },
+        {
+            "bufferView" : 3,
+            "componentType" : 5123,
+            "count" : 6,
+            "type" : "SCALAR"
+        }
+    ],
+    "bufferViews" : [
+        {
+            "buffer" : 0,
+            "byteLength" : 48,
+            "byteOffset" : 0
+        },
+        {
+            "buffer" : 0,
+            "byteLength" : 48,
+            "byteOffset" : 48
+        },
+        {
+            "buffer" : 0,
+            "byteLength" : 32,
+            "byteOffset" : 96
+        },
+        {
+            "buffer" : 0,
+            "byteLength" : 12,
+            "byteOffset" : 128
+        }
+    ],
+    "samplers" : [
+        {
+            "magFilter" : 9729,
+            "minFilter" : 9986
+        }
+    ],
+    "buffers" : [
+        {
+            "byteLength" : 140,
+            "uri" : "ground.bin"
+        }
+    ]
+}
diff --git a/projects/indirect_dispatch/src/App.cpp b/projects/indirect_dispatch/src/App.cpp
index cc7bff04..3cfc39d7 100644
--- a/projects/indirect_dispatch/src/App.cpp
+++ b/projects/indirect_dispatch/src/App.cpp
@@ -31,7 +31,7 @@ bool App::initialize() {
 		return false;
 
 	if (!loadPrePass(m_core, &m_prePass))
-		false;
+		return false;
 
 	if (!loadSkyPrePass(m_core, &m_skyPrePass))
 		return false;
diff --git a/projects/indirect_dispatch/src/MotionBlur.cpp b/projects/indirect_dispatch/src/MotionBlur.cpp
index 9aae3f00..35085dc7 100644
--- a/projects/indirect_dispatch/src/MotionBlur.cpp
+++ b/projects/indirect_dispatch/src/MotionBlur.cpp
@@ -53,6 +53,8 @@ bool MotionBlur::initialize(vkcv::Core* corePtr, const uint32_t targetWidth, con
 		vkcv::SamplerFilterType::NEAREST,
 		vkcv::SamplerMipmapMode::NEAREST,
 		vkcv::SamplerAddressMode::CLAMP_TO_EDGE);
+	
+	return true;
 }
 
 void MotionBlur::setResolution(const uint32_t targetWidth, const uint32_t targetHeight) {
-- 
GitLab