Files
XCEngine/README.md
2026-03-11 17:39:33 +08:00

67 lines
1.5 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# XCVolumeRenderer
基于 DirectX 12 的体积渲染器使用几何着色器Geometry Shader实现三维数据的可视化渲染。
## 技术栈
- **渲染API**: DirectX 12
- **语言**: C++17
- **构建系统**: CMake
- **依赖库**: DirectX 12 SDK, stb_image
## 项目结构
```
XCVolumeRenderer/
├── main.cpp # 主程序入口
├── BattleFireDirect.cpp/h # DirectX 12 核心渲染实现
├── StaticMeshComponent.cpp/h # 静态网格组件
├── Utils.cpp/h # 工具函数
├── stbi/ # 图像加载库
├── Res/
│ ├── Shader/ # HLSL 着色器
│ ├── Model/ # 模型文件
│ └── Image/ # 纹理图片
├── CMakeLists.txt # CMake 构建配置
└── build/ # 构建目录
```
## 构建方法
### 前置要求
- Windows 10/11
- Visual Studio 2019 或更高版本
- CMake 3.15+
### 构建步骤
```bash
# 创建并进入构建目录
mkdir build && cd build
# 配置项目
cmake ..
# 编译
cmake --build . --config Release
```
### 运行
编译完成后,在 `Release` 目录下运行 `XCVolumeRenderer.exe`
## 功能特性
- DirectX 12 基础渲染管线
- 几何着色器GS支持
- 纹理映射
- 常量缓冲区和常量缓冲区视图CBV/SRV
- 基础变换矩阵(投影、视图、模型)
## 资源说明
- 着色器文件位于 `Res/Shader/` 目录
- 模型文件为 `.lhsm` 格式
- 纹理支持 PNG、JPG 格式