summaryrefslogtreecommitdiff
path: root/scene/resources/shader.h
diff options
context:
space:
mode:
authorJuan Linietsky <reduzio@gmail.com>2015-01-03 16:52:37 -0300
committerJuan Linietsky <reduzio@gmail.com>2015-01-03 16:52:37 -0300
commitfbdd925d9be1c4c96d05089d7d5a58cd938b002c (patch)
tree9f4eb2ae7c61450dffb4a86bb5e82cf66e23d496 /scene/resources/shader.h
parenteb1f978b1c1693018e9a6d353ca914f8e6586b4e (diff)
-Work in progress visual shader editor *DOES NOT WORK YET*
Diffstat (limited to 'scene/resources/shader.h')
-rw-r--r--scene/resources/shader.h18
1 files changed, 15 insertions, 3 deletions
diff --git a/scene/resources/shader.h b/scene/resources/shader.h
index e1b8288c51..8c15ca43d4 100644
--- a/scene/resources/shader.h
+++ b/scene/resources/shader.h
@@ -50,6 +50,8 @@ class Shader : public Resource {
mutable Map<StringName,StringName> params_cache; //map a shader param to a material param..
Map<StringName,Ref<Texture> > default_textures;
+
+
protected:
@@ -59,10 +61,11 @@ public:
MODE_MATERIAL,
MODE_CANVAS_ITEM,
- MODE_POST_PROCESS
+ MODE_POST_PROCESS,
+ MODE_MAX
};
- void set_mode(Mode p_mode);
+ //void set_mode(Mode p_mode);
Mode get_mode() const;
void set_code( const String& p_vertex, const String& p_fragment, const String& p_light,int p_fragment_ofs=0,int p_light_ofs=0);
@@ -79,13 +82,22 @@ public:
virtual RID get_rid() const;
- Shader();
+ Shader(Mode p_mode);
~Shader();
};
VARIANT_ENUM_CAST( Shader::Mode );
+class MaterialShader : public Shader {
+
+ OBJ_TYPE(MaterialShader,Shader);
+
+public:
+
+ MaterialShader() : Shader(MODE_MATERIAL) {};
+};
+
class ResourceFormatLoaderShader : public ResourceFormatLoader {