From 53cf2d628784a2a880e32155b4494c3078122f01 Mon Sep 17 00:00:00 2001
From: Lars Hoerttrich <larshoerttrich@uni-koblenz.de>
Date: Fri, 11 Jun 2021 15:59:41 +0200
Subject: [PATCH] [#57] WIP: added Validation

---
 .../vkcv/material/pbrMetallicRoughness.cpp    | 49 ++++++++++++++++---
 1 file changed, 41 insertions(+), 8 deletions(-)

diff --git a/modules/material/src/vkcv/material/pbrMetallicRoughness.cpp b/modules/material/src/vkcv/material/pbrMetallicRoughness.cpp
index da915c78..6177b786 100644
--- a/modules/material/src/vkcv/material/pbrMetallicRoughness.cpp
+++ b/modules/material/src/vkcv/material/pbrMetallicRoughness.cpp
@@ -30,14 +30,47 @@ namespace vkcv::material
     }
     void pbrMaterial::create(vkcv::Core core)
     {   
-        //Test if Images and samplers valid
-        //create default
-        vkcv::SamplerHandle defaultSampler = core.createSampler(
-            vkcv::SamplerFilterType::LINEAR,
-            vkcv::SamplerFilterType::LINEAR,
-            vkcv::SamplerMipmapMode::LINEAR,
-            vkcv::SamplerAddressMode::REPEAT
-        );         
+        //Test if Images and samplers valid, if not use default
+        if (m_ColorTexture) {
+            //TODO
+        }
+        if (m_NormalTexture) {
+            //TODO
+        }
+        if (m_MetRoughTexture) {
+            //TODO
+        }
+        if (m_ColorSampler) {
+            /*
+            m_ColorSampler = core.createSampler(
+                vkcv::SamplerFilterType::LINEAR,
+                vkcv::SamplerFilterType::LINEAR,
+                vkcv::SamplerMipmapMode::LINEAR,
+                vkcv::SamplerAddressMode::REPEAT
+            );//only non const member
+            */
+        }
+        if (m_NormalSampler) {
+            /*
+            m_NormalSampler = core.createSampler(
+                vkcv::SamplerFilterType::LINEAR,
+                vkcv::SamplerFilterType::LINEAR,
+                vkcv::SamplerMipmapMode::LINEAR,
+                vkcv::SamplerAddressMode::REPEAT
+            ); //only non const member
+            */
+        }
+        if (m_MetRoughSampler) {
+            /*
+            m_MetRoughSampler = core.createSampler(
+                vkcv::SamplerFilterType::LINEAR,
+                vkcv::SamplerFilterType::LINEAR,
+                vkcv::SamplerMipmapMode::LINEAR,
+                vkcv::SamplerAddressMode::REPEAT
+            ); //only non const member
+            */
+        }
+          
         //create descriptorset
         vkcv::DescriptorSetHandle descriptorSet = core.createDescriptorSet(getDescriptorBindings());       
         //writes
-- 
GitLab