feat: 多光源——点光源类型(距离衰减,位置来自 Transform)
- LightComponent 加 Type(Directional/Point)+ radius;点光位置取 实体 Transform(固有组件首次实际受益) - LightData shader 契约扩为 4×vec4(color/direction/position/params, 每灯 64B,未用字段置零);UBO 688→816B - 光照循环按类型分支:方向光无衰减;点光 L 指向光源 + 平方距离衰减, 衰减半径外跳过;CSM 阴影只来自第 0 盏方向光 - main.cpp:SunTemple 场景加暖橙火坑光 + 冷蓝填充光(点光); KeyLight/FillLight 改 designated initializer
This commit is contained in:
@@ -20,9 +20,9 @@
|
||||
|
||||
namespace Engine {
|
||||
|
||||
Application::Application(std::string title, u32 width, u32 height)
|
||||
Application::Application(const std::string& title, u32 width, u32 height)
|
||||
{
|
||||
m_Window = CreateScope<Window>(std::move(title), width, height);
|
||||
m_Window = CreateScope<Window>(title, width, height);
|
||||
|
||||
// 事件通道:GLFW 回调 → 本类 DispatchEvent → 派生类钩子
|
||||
m_Window->SetEventCallback(
|
||||
|
||||
Reference in New Issue
Block a user