From e9357ba46155930cc1dd92fd095fdf2c3b83b2d5 Mon Sep 17 00:00:00 2001 From: Tim Vaughan Date: Mon, 20 Feb 2023 09:20:30 +0100 Subject: [PATCH] Added "count" texture. --- Textures.lua | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/Textures.lua b/Textures.lua index b1d1cb3..a06faa7 100644 --- a/Textures.lua +++ b/Textures.lua @@ -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 -- 2.20.1