1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-07 12:30:27 +00:00

Polygon2D

-=-=-=-=-

Another gift for those who make 2D games:
-Edit polygons, concave or convex, color them, texture them and uv-map them
-Corresponding editor
-Can have a custom pivot, so they are compatible with bones and IK
This commit is contained in:
Juan Linietsky
2014-07-07 17:44:21 -03:00
parent 3d68949a1c
commit 9ff6d55822
16 changed files with 1631 additions and 12 deletions

View File

@@ -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;
}