SpiderPig Posted February 11, 2023 Share Posted February 11, 2023 I think I may have addressed this before but can't remember... an entity will not cast a shadow if it has a pivot as a parent. #include "UltraEngine.h" using namespace UltraEngine; int main(int argc, const char* argv[]) { auto displays = GetDisplays(); auto window = CreateWindow("Ultra Engine", 0, 0, 800, 600, displays[0]); auto world = CreateWorld(); auto framebuffer = CreateFramebuffer(window); auto camera = CreateCamera(world); camera->SetClearColor(0.0f, 0.0f, 1.0f); camera->SetFov(70); camera->SetRange(0.01f, 1000.0f); camera->SetPosition(0, 1, -3); auto light = CreateDirectionalLight(world); light->SetColor(5.0f); light->SetRotation(35, 45, 0); auto floor = CreateBox(world, 100.0f, 0.1f, 100.0f); auto pivot = CreatePivot(world); auto box = CreateBox(world); box->SetParent(pivot); pivot->SetPosition(0.0f, 2.0f, 0.0f); while (window->Closed() == false and window->KeyDown(KEY_ESCAPE) == false) { world->Update(); world->Render(framebuffer, false); } return 0; } Quote Link to comment Share on other sites More sharing options...
Solution Josh Posted February 11, 2023 Solution Share Posted February 11, 2023 Did you enable shadows on the pivot? Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
SpiderPig Posted February 11, 2023 Author Share Posted February 11, 2023 Ah yes, that fixes it. Maybe this should be done by default though? Quote Link to comment Share on other sites More sharing options...
SpiderPig Posted February 11, 2023 Author Share Posted February 11, 2023 Actually... why does a parents shadow mode effect it's children's? Quote Link to comment Share on other sites More sharing options...
Josh Posted February 11, 2023 Share Posted February 11, 2023 Because the culling iterates through the hierarchy and stops if shadows are disabled. This is the intended behavior. 1 Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.