feat(渲染): 实现2D渲染风格系统
添加渲染风格预设配置,支持像素风、平滑2D和混合模式 新增纹理采样控制、顶点像素对齐和UV收缩优化 为相机和场景添加渲染风格覆盖功能
This commit is contained in:
@@ -46,6 +46,7 @@ int main(int argc, char **argv) {
|
||||
config.virtualWidth = 1066;
|
||||
config.virtualHeight = 600;
|
||||
config.resolutionMode = ResolutionScaleMode::FitHeight;
|
||||
config.renderStyleProfile = RenderStyleProfileId::PixelArt2D;
|
||||
|
||||
Application &app = Application::get();
|
||||
{
|
||||
|
||||
@@ -381,7 +381,7 @@ void GameMap::updateLayerPositions(const Vec2 &cameraFocus) {
|
||||
return;
|
||||
}
|
||||
|
||||
Vec2 cameraPos = camera->getPosition();
|
||||
Vec2 cameraPos = camera->getRenderPosition();
|
||||
|
||||
// 主视图平移完全交给底层
|
||||
// Camera,这里只保留地图层自己的静态校准和少量视差偏移。
|
||||
|
||||
Reference in New Issue
Block a user