diff tests/test_materials.nim @ 211:744285b47a4d

did: refactor image handling
author Sam <sam@basx.dev>
date Tue, 09 May 2023 19:52:57 +0700
parents ab626e67a1ee
children 027f6ff06585
line wrap: on
line diff
--- a/tests/test_materials.nim	Tue May 09 18:19:17 2023 +0700
+++ b/tests/test_materials.nim	Tue May 09 19:52:57 2023 +0700
@@ -7,21 +7,21 @@
   let (R, W) = ([255'u8, 0'u8, 0'u8, 255'u8], [255'u8, 255'u8, 255'u8, 255'u8])
   let (RT, WT, PT) = (hexToColorAlpha("A51931").asPixel, hexToColorAlpha("F4F5F8").asPixel, hexToColorAlpha("2D2A4A").asPixel)
   let
-    t1 = TextureImage(width: 5, height: 5, imagedata: @[
+    t1 = Image(width: 5, height: 5, imagedata: @[
       R, R, R, R, R,
       R, R, W, R, R,
       R, W, W, W, R,
       R, R, W, R, R,
       R, R, R, R, R,
     ])
-    t2 = TextureImage(width: 7, height: 5, imagedata: @[
+    t2 = Image(width: 7, height: 5, imagedata: @[
       RT, RT, RT, RT, RT, RT, RT,
       WT, WT, WT, WT, WT, WT, WT,
       PT, PT, PT, PT, PT, PT, PT,
       WT, WT, WT, WT, WT, WT, WT,
       RT, RT, RT, RT, RT, RT, RT,
     ])
-  scene.addTextures("my_texture", @[t1, t2])
+  scene.addTextures("my_texture", @[t1, t2], interpolation=VK_FILTER_NEAREST)
   scene.addShaderGlobal("time", 0'f32)
   var m: Mesh = Mesh(scene.root.components[0])