The Lambda Lab
/
projects
/
raymarcher.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
bbd8d6d
)
Added "count" texture.
author
Tim Vaughan
<timv@ughan.xyz>
Mon, 20 Feb 2023 08:20:30 +0000
(09:20 +0100)
committer
Tim Vaughan
<timv@ughan.xyz>
Mon, 20 Feb 2023 08:20:30 +0000
(09:20 +0100)
Textures.lua
patch
|
blob
|
history
diff --git
a/Textures.lua
b/Textures.lua
index
b1d1cb3
..
a06faa7
100644
(file)
--- 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