From: Tim Vaughan Date: Mon, 20 Feb 2023 08:20:30 +0000 (+0100) Subject: Added "count" texture. X-Git-Url: https://thelambdalab.xyz/gitweb/index.cgi?p=raymarcher.git;a=commitdiff_plain;h=e9357ba46155930cc1dd92fd095fdf2c3b83b2d5 Added "count" texture. --- 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