Transparent objects working.

This commit is contained in:
Tleety
2014-05-29 23:59:36 +02:00
parent eb37cc2296
commit cc84f04542
15 changed files with 244 additions and 81 deletions
+12 -2
View File
@@ -98,7 +98,6 @@ void GameWorld::Initialize()
// CommitEntity(ground);
//}
{
auto ground_middle = CreateEntity();
auto transform = AddComponent<Components::Transform>(ground_middle);
@@ -109,7 +108,7 @@ void GameWorld::Initialize()
auto blendmap = AddComponent<Components::BlendMap>(ground_middle);
blendmap->TextureRed = "Textures/Ground/Sand.png";
blendmap->TextureGreen = "Textures/Ground/Grass.png";
blendmap->TextureBlue = "Textures/Ground/Asphalt.png";
blendmap->TextureBlue = "Textures/Ground/Rock.png";
blendmap->TextureRepeats = 30.f;
auto physics = AddComponent<Components::Physics>(ground_middle);
@@ -239,6 +238,17 @@ void GameWorld::Initialize()
CommitEntity(ground_base_mirrored);
}
{
auto tree = CreateEntity();
auto transform = AddComponent<Components::Transform>(tree);
transform->Position = glm::vec3(0, -15, 0);
auto model = AddComponent<Components::Model>(tree);
model->ModelFile = "Models/Tree/leafs/Leafs.obj";
model->Transparent = true;
CommitEntity(tree);
}
EntityID tank1 = CreateTank(1);
{
auto transform = GetComponent<Components::Transform>(tank1);