diff semiconginev2/rendering/shaders.nim @ 1247:c15770761865

add: gltf loading test, gltf loading for materials
author sam <sam@basx.dev>
date Wed, 24 Jul 2024 23:26:34 +0700
parents 42eeb59f3a43
children 01e9f41d35b1
line wrap: on
line diff
--- a/semiconginev2/rendering/shaders.nim	Wed Jul 24 20:12:19 2024 +0700
+++ b/semiconginev2/rendering/shaders.nim	Wed Jul 24 23:26:34 2024 +0700
@@ -36,7 +36,9 @@
   elif T is TMat4[float32]: "mat4"
   elif T is TMat4[float64]: "dmat4"
   elif T is Image: "sampler2D"
-  else: {.error: "Unsupported data type on GPU".}
+  else:
+    const n = typetraits.name(T)
+    {.error: "Unsupported data type on GPU: " & n.}
 
 func VkType[T: SupportedGPUType](value: T): VkFormat =
   when T is float32: VK_FORMAT_R32_SFLOAT