summaryrefslogtreecommitdiff
path: root/Samples/Hello/scripts/material_loader.lua
diff options
context:
space:
mode:
Diffstat (limited to 'Samples/Hello/scripts/material_loader.lua')
-rw-r--r--Samples/Hello/scripts/material_loader.lua14
1 files changed, 7 insertions, 7 deletions
diff --git a/Samples/Hello/scripts/material_loader.lua b/Samples/Hello/scripts/material_loader.lua
index 628ca3b..2e9b771 100644
--- a/Samples/Hello/scripts/material_loader.lua
+++ b/Samples/Hello/scripts/material_loader.lua
@@ -2,15 +2,15 @@ local MaterialLoader = AsuraEngine.Importer.New("material")
local MaterialManager = require "MaterialManager.lua"
function MaterialLoader.Load(mat)
- local shader = AsuraEngine.Shader.GetShader(mat.shader)
+ local shader = AsuraEngine.Shader.GetShader(mat.shader)
+ if shader == nil then
+ shader = AsuraEngine.Shader.New(mat.shader)
if shader == nil then
- shader = AsuraEngine.Shader.New(mat.shader)
- if shader == nil then
- return nil
- end
+ return nil
end
- local material = AsuraEngine.Class()
- return material
+ end
+ local material = AsuraEngine.Class()
+ return material
end
return MaterialLoader \ No newline at end of file