Decal normal map support (#646)

This commit is contained in:
Turánszki János
2023-02-27 11:25:02 +01:00
committed by GitHub
parent 23028e1450
commit 2baad338b9
16 changed files with 357 additions and 251 deletions
+6 -1
View File
@@ -77,7 +77,12 @@ void OptionsWindow::Create(EditorComponent* _editor)
pick.entity = scene.Entity_CreateForce("force");
break;
case 7:
pick.entity = scene.Entity_CreateDecal("decal", "images/logo_small.png");
pick.entity = scene.Entity_CreateDecal("decal", "");
if (scene.materials.Contains(pick.entity))
{
MaterialComponent* decal_material = scene.materials.GetComponent(pick.entity);
decal_material->textures[MaterialComponent::BASECOLORMAP].resource.SetTexture(*wi::texturehelper::getLogo());
}
scene.transforms.GetComponent(pick.entity)->RotateRollPitchYaw(XMFLOAT3(XM_PIDIV2, 0, 0));
break;
case 8: