summaryrefslogtreecommitdiff
path: root/src/extend/light.h
diff options
context:
space:
mode:
authorchai <chaifix@163.com>2020-02-26 22:52:19 +0800
committerchai <chaifix@163.com>2020-02-26 22:52:19 +0800
commit372d77e436d21312ef1a0df622964751716963a3 (patch)
tree1a71865fea6fb9f2f532422c4b83959fff17ea76 /src/extend/light.h
parent27687536844ed3b045bba1abd1aae8bb3692f6cb (diff)
*misc
Diffstat (limited to 'src/extend/light.h')
-rw-r--r--src/extend/light.h25
1 files changed, 25 insertions, 0 deletions
diff --git a/src/extend/light.h b/src/extend/light.h
new file mode 100644
index 0000000..410dd72
--- /dev/null
+++ b/src/extend/light.h
@@ -0,0 +1,25 @@
+#ifndef _SOFTSHADEROOM_LIGHT_H_
+#define _SOFTSHADEROOM_LIGHT_H_
+
+#include "../math/math.h"
+#include "../core/texture.h"
+#include "transform.h"
+
+typedef enum {
+ LIGHT_POINT,
+ LIGHT_DIRECTION,
+ LIGHT_SPOT,
+} LightMode;
+
+typedef struct {
+ Transform transform;
+ LightMode mode;
+ Color32 color;
+ float range;
+} Light;
+
+// LUT for lights
+Texture* light_attenuation_tex;
+Texture* light_cookie_tex;
+
+#endif \ No newline at end of file