Added "count" texture.
authorTim Vaughan <timv@ughan.xyz>
Mon, 20 Feb 2023 08:20:30 +0000 (09:20 +0100)
committerTim Vaughan <timv@ughan.xyz>
Mon, 20 Feb 2023 08:20:30 +0000 (09:20 +0100)
Textures.lua

index b1d1cb3..a06faa7 100644 (file)
@@ -19,9 +19,17 @@ local function make_phong(lights, colour, amb, spec, shiny)
       return thiscol
    end
 end
+
+local function make_count_texture()
+   return function (location, ray_dir, normal, count)
+      return {count/10, count/10, count/10}
+   end
+end
+
    
 Textures = {
-   make_phong = make_phong
+   make_phong = make_phong,
+   make_count_texture = make_count_texture
 }
 
 return Textures