changeset 837:0d46e6638bd6

fix: all tests
author Sam <sam@basx.dev>
date Sun, 26 Nov 2023 19:53:00 +0700
parents 3a61608f5206
children 970f74d5284e
files tests/test_materials.nim tests/test_vulkan_wrapper.nim
diffstat 2 files changed, 12 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/tests/test_materials.nim	Sun Nov 26 19:52:42 2023 +0700
+++ b/tests/test_materials.nim	Sun Nov 26 19:53:00 2023 +0700
@@ -50,8 +50,8 @@
       ],
       uniforms=[attr[float32]("test2", arrayCount=2)],
       samplers = @[
-        attr[Texture]("tex1", arrayCount=2),
-        attr[Texture]("tex2", arrayCount=2),
+        attr[Texture]("tex1", arrayCount=1),
+        attr[Texture]("tex2", arrayCount=1),
       ],
       outputs=[attr[Vec4f]("color")],
       vertexCode="""
--- a/tests/test_vulkan_wrapper.nim	Sun Nov 26 19:52:42 2023 +0700
+++ b/tests/test_vulkan_wrapper.nim	Sun Nov 26 19:53:00 2023 +0700
@@ -23,7 +23,15 @@
       ]), sampler: sampler)])
     }.toTable
   )
-  mat2 = SINGLE_TEXTURE_MATERIAL.initMaterialData(
+  Mat2Type = MaterialType(
+    name: "single texture material 2",
+    meshAttributes: {
+      "position": Vec3F32,
+      "uv": Vec2F32,
+    }.toTable,
+    attributes: {"baseTexture": TextureType}.toTable
+  )
+  mat2 = Mat2Type.initMaterialData(
     name="mat2",
     attributes={
       "baseTexture": initDataList(@[Texture(image: Image(width: 5, height: 5, imagedata: @[
@@ -199,6 +207,7 @@
   engine.initRenderer({
     SINGLE_TEXTURE_MATERIAL: shaderConfiguration1,
     SINGLE_TEXTURE_MATERIAL: shaderConfiguration1,
+    Mat2Type: shaderConfiguration1,
     SINGLE_COLOR_MATERIAL: shaderConfiguration2,
   })