ソースを参照

Fix octahedral compression with Sprite3D

Needs a default which is not zero
Gordon MacPherson 4 年 前
コミット
f038c6a926
1 ファイル変更3 行追加3 行削除
  1. 3 3
      scene/3d/sprite_3d.cpp

+ 3 - 3
scene/3d/sprite_3d.cpp

@@ -386,11 +386,11 @@ SpriteBase3D::SpriteBase3D() {
 
 	// create basic mesh and store format information
 	for (int i = 0; i < 4; i++) {
-		mesh_normals.write()[i] = Vector3(0.0, 0.0, 0.0);
+		mesh_normals.write()[i] = Vector3(0.0, 0.0, 1.0);
 		mesh_tangents.write()[i * 4 + 0] = 0.0;
 		mesh_tangents.write()[i * 4 + 1] = 0.0;
-		mesh_tangents.write()[i * 4 + 2] = 0.0;
-		mesh_tangents.write()[i * 4 + 3] = 0.0;
+		mesh_tangents.write()[i * 4 + 2] = 1.0;
+		mesh_tangents.write()[i * 4 + 3] = 1.0;
 		mesh_colors.write()[i] = Color(1.0, 1.0, 1.0, 1.0);
 		mesh_uvs.write()[i] = Vector2(0.0, 0.0);
 		mesh_vertices.write()[i] = Vector3(0.0, 0.0, 0.0);