summaryrefslogtreecommitdiff
path: root/honey/asset/shader.lua
diff options
context:
space:
mode:
authorsanine-a <sanine.not@pm.me>2023-05-12 14:10:48 -0500
committersanine-a <sanine.not@pm.me>2023-05-12 14:10:48 -0500
commit0d96ebc90c9740e7e66a70aa11168b11f49d220b (patch)
tree758403f74f4fbcab61a228ef58e720850b3f70db /honey/asset/shader.lua
parent6036d1b5d7e0fc160637ce70595bac57ed1fcd00 (diff)
run working program with refactored code
Diffstat (limited to 'honey/asset/shader.lua')
-rw-r--r--honey/asset/shader.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/honey/asset/shader.lua b/honey/asset/shader.lua
index 0e8c93a..a23c17b 100644
--- a/honey/asset/shader.lua
+++ b/honey/asset/shader.lua
@@ -35,8 +35,8 @@ local function buildProgram(sources)
local shader = compileShader(readFile(sources.vertex), gl.VERTEX_SHADER)
table.insert(shaders, shader)
end
- if sources.vertex then
- local shader = compileShader(readFile(sources.vertex), gl.VERTEX_SHADER)
+ if sources.fragment then
+ local shader = compileShader(readFile(sources.fragment), gl.FRAGMENT_SHADER)
table.insert(shaders, shader)
end