diff options
Diffstat (limited to 'servers')
-rw-r--r-- | servers/visual/rasterizer.cpp | 2 | ||||
-rw-r--r-- | servers/visual/visual_server_raster.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/servers/visual/rasterizer.cpp b/servers/visual/rasterizer.cpp index 610e9a6a1b..e160b4dccc 100644 --- a/servers/visual/rasterizer.cpp +++ b/servers/visual/rasterizer.cpp @@ -96,7 +96,7 @@ RID Rasterizer::_create_shader(const FixedMaterialShaderKey& p_key) { } else { uv_str=_TEXUVSTR(VS::FIXED_MATERIAL_PARAM_NORMAL); } - scode+="vec3 normal=tex( fmp_normal_tex,"+uv_str+").xyz * 2.0 - vec3(1.0,1.0,1.0);\n"; + scode+="vec3 normal=tex( fmp_normal_tex,"+uv_str+").xyz * vec3(2.0,2.0,1.0) - vec3(1.0,1.0,0.0);\n"; scode+="NORMAL = mix( NORMAL,mat3(TANGENT,BINORMAL,NORMAL) * normal, fmp_normal);\n"; code+=scode; } diff --git a/servers/visual/visual_server_raster.cpp b/servers/visual/visual_server_raster.cpp index f171b47e9c..7c1f03b71b 100644 --- a/servers/visual/visual_server_raster.cpp +++ b/servers/visual/visual_server_raster.cpp @@ -3432,7 +3432,7 @@ void VisualServerRaster::canvas_item_add_triangle_array(RID p_item, const Vector ERR_FAIL_COND(!canvas_item); int ps = p_points.size(); - ERR_FAIL_COND(!p_colors.empty() && p_colors.size()!=ps); + ERR_FAIL_COND(!p_colors.empty() && p_colors.size()!=ps && p_colors.size()!=1); ERR_FAIL_COND(!p_uvs.empty() && p_uvs.size()!=ps); Vector<int> indices = p_indices; |