diff options
Diffstat (limited to 'drivers/gles2/rasterizer_gles2.h')
-rw-r--r-- | drivers/gles2/rasterizer_gles2.h | 25 |
1 files changed, 12 insertions, 13 deletions
diff --git a/drivers/gles2/rasterizer_gles2.h b/drivers/gles2/rasterizer_gles2.h index cf4c8717e9..60a7731fea 100644 --- a/drivers/gles2/rasterizer_gles2.h +++ b/drivers/gles2/rasterizer_gles2.h @@ -163,8 +163,10 @@ class RasterizerGLES2 : public Rasterizer { String vertex_code; String fragment_code; + String light_code; int vertex_line; int fragment_line; + int light_line; VS::ShaderMode mode; uint32_t custom_code_id; @@ -193,6 +195,7 @@ class RasterizerGLES2 : public Rasterizer { version=1; vertex_line=0; fragment_line=0; + light_line=0; can_zpass=true; has_texscreen=false; has_screen_uv=false; @@ -211,10 +214,9 @@ class RasterizerGLES2 : public Rasterizer { struct Material { bool flags[VS::MATERIAL_FLAG_MAX]; - bool hints[VS::MATERIAL_HINT_MAX]; - VS::MaterialShadeModel shade_model; VS::MaterialBlendMode blend_mode; + VS::MaterialDepthDrawMode depth_draw_mode; float line_width; bool has_alpha; @@ -241,12 +243,10 @@ class RasterizerGLES2 : public Rasterizer { for(int i=0;i<VS::MATERIAL_FLAG_MAX;i++) flags[i]=false; flags[VS::MATERIAL_FLAG_VISIBLE]=true; - for(int i=0;i<VS::MATERIAL_HINT_MAX;i++) - hints[i]=false; - hints[VS::MATERIAL_HINT_NO_DEPTH_DRAW_FOR_ALPHA]=true; line_width=1; has_alpha=false; + depth_draw_mode=VS::MATERIAL_DEPTH_DRAW_OPAQUE_ONLY; blend_mode=VS::MATERIAL_BLEND_MODE_MIX; last_pass = 0; shader_version=0; @@ -590,7 +590,6 @@ class RasterizerGLES2 : public Rasterizer { vars[VS::LIGHT_PARAM_SHADOW_Z_SLOPE_SCALE]=1.4; vars[VS::LIGHT_PARAM_SHADOW_ESM_MULTIPLIER]=60.0; vars[VS::LIGHT_PARAM_SHADOW_BLUR_PASSES]=1; - colors[VS::LIGHT_COLOR_AMBIENT]=Color(0,0,0); colors[VS::LIGHT_COLOR_DIFFUSE]=Color(1,1,1); colors[VS::LIGHT_COLOR_SPECULAR]=Color(1,1,1); shadow_enabled=false; @@ -635,8 +634,9 @@ class RasterizerGLES2 : public Rasterizer { fx_param[VS::ENV_FX_PARAM_DOF_BLUR_PASSES]=1; fx_param[VS::ENV_FX_PARAM_DOF_BLUR_BEGIN]=100.0; fx_param[VS::ENV_FX_PARAM_DOF_BLUR_RANGE]=10.0; + fx_param[VS::ENV_FX_PARAM_HDR_TONEMAPPER]=VS::ENV_FX_HDR_TONE_MAPPER_LINEAR; fx_param[VS::ENV_FX_PARAM_HDR_EXPOSURE]=0.4; - fx_param[VS::ENV_FX_PARAM_HDR_SCALAR]=1.0; + fx_param[VS::ENV_FX_PARAM_HDR_WHITE]=1.0; fx_param[VS::ENV_FX_PARAM_HDR_GLOW_TRESHOLD]=0.95; fx_param[VS::ENV_FX_PARAM_HDR_GLOW_SCALE]=0.2; fx_param[VS::ENV_FX_PARAM_HDR_MIN_LUMINANCE]=0.4; @@ -1172,9 +1172,11 @@ public: virtual void shader_set_mode(RID p_shader,VS::ShaderMode p_mode); virtual VS::ShaderMode shader_get_mode(RID p_shader) const; - virtual void shader_set_code(RID p_shader, const String& p_vertex, const String& p_fragment,int p_vertex_ofs=0,int p_fragment_ofs=0); + virtual void shader_set_code(RID p_shader, const String& p_vertex, const String& p_fragment,const String& p_light,int p_vertex_ofs=0,int p_fragment_ofs=0,int p_light_ofs=0); virtual String shader_get_fragment_code(RID p_shader) const; virtual String shader_get_vertex_code(RID p_shader) const; + virtual String shader_get_light_code(RID p_shader) const; + virtual void shader_get_param_list(RID p_shader, List<PropertyInfo> *p_param_list) const; @@ -1192,11 +1194,8 @@ public: virtual void material_set_flag(RID p_material, VS::MaterialFlag p_flag,bool p_enabled); virtual bool material_get_flag(RID p_material,VS::MaterialFlag p_flag) const; - virtual void material_set_hint(RID p_material, VS::MaterialHint p_hint,bool p_enabled); - virtual bool material_get_hint(RID p_material,VS::MaterialHint p_hint) const; - - virtual void material_set_shade_model(RID p_material, VS::MaterialShadeModel p_model); - virtual VS::MaterialShadeModel material_get_shade_model(RID p_material) const; + virtual void material_set_depth_draw_mode(RID p_material, VS::MaterialDepthDrawMode p_mode); + virtual VS::MaterialDepthDrawMode material_get_depth_draw_mode(RID p_material) const; virtual void material_set_blend_mode(RID p_material,VS::MaterialBlendMode p_mode); virtual VS::MaterialBlendMode material_get_blend_mode(RID p_material) const; |