Implemented scanline and silhouette effect #363

Merged
Xenosas1337 merged 12 commits from SP3-1-Rendering into main 2023-02-24 17:20:46 +08:00
2 changed files with 17 additions and 3 deletions
Showing only changes of commit f2101243e7 - Show all commits

View File

@ -254,7 +254,8 @@ RTTR_REGISTRATION
.property("Height", &SHCameraComponent::GetHeight, &SHCameraComponent::SetHeight) .property("Height", &SHCameraComponent::GetHeight, &SHCameraComponent::SetHeight)
.property("Near", &SHCameraComponent::GetNear, &SHCameraComponent::SetNear) .property("Near", &SHCameraComponent::GetNear, &SHCameraComponent::SetNear)
.property("Far", &SHCameraComponent::GetFar, &SHCameraComponent::SetFar) .property("Far", &SHCameraComponent::GetFar, &SHCameraComponent::SetFar)
.property("Perspective", &SHCameraComponent::GetIsPerspective, &SHCameraComponent::SetIsPerspective); .property("Perspective", &SHCameraComponent::GetIsPerspective, &SHCameraComponent::SetIsPerspective)
.property("FOV",&SHCameraComponent::GetFOV, &SHCameraComponent::SetFOV);
} }

View File

@ -145,6 +145,19 @@ namespace SHADE
//std::cout << EVENT_DATA->resizeWidth << std::endl; //std::cout << EVENT_DATA->resizeWidth << std::endl;
//std::cout << EVENT_DATA->resizeHeight << std::endl; //std::cout << EVENT_DATA->resizeHeight << std::endl;
for (auto director : directorHandleList)
{
auto camera = SHComponentManager::GetComponent_s<SHCameraComponent>(director->mainCameraEID);
if (camera)
{
camera->SetWidth(EVENT_DATA->resizeWidth);
camera->SetHeight(EVENT_DATA->resizeHeight);
}
}
return eventPtr->handle; return eventPtr->handle;
} }
@ -222,8 +235,8 @@ namespace SHADE
//SHLOG_INFO("CAMERA COLLISION HIT, {} armlength: {}, true armlength: {}", hitResult.distance, hitResult.distance, (cameraPos - camera->position).Length()); //SHLOG_INFO("CAMERA COLLISION HIT, {} armlength: {}, true armlength: {}", hitResult.distance, hitResult.distance, (cameraPos - camera->position).Length());
//SHLOG_INFO("Racoon Position {}, {}, {}, Camera Position: {}, {}, {}, Distance {}", cameraTarget.x, cameraTarget.y, cameraTarget.z, cameraPos.x, cameraPos.y, cameraPos.z, SHVec3::Distance(cameraTarget, cameraPos)); //SHLOG_INFO("Racoon Position {}, {}, {}, Camera Position: {}, {}, {}, Distance {}", cameraTarget.x, cameraTarget.y, cameraTarget.z, cameraPos.x, cameraPos.y, cameraPos.z, SHVec3::Distance(cameraTarget, cameraPos));
//SHLOG_INFO("Camera Position: {}, {}, {}", cameraPos.x, cameraPos.y, cameraPos.z); //SHLOG_INFO("Camera Position: {}, {}, {}", cameraPos.x, cameraPos.y, cameraPos.z);
auto otherTransform = SHComponentManager::GetComponent_s<SHTransformComponent>(hitResult.entityHit); //auto otherTransform = SHComponentManager::GetComponent_s<SHTransformComponent>(hitResult.entityHit);
SHVec3 otherPos = hitResult.position; //SHVec3 otherPos = hitResult.position;