HEngine
  • 引擎编译
  • 未来工作
  • 使用文档
    • 代码规范
    • Shader规范
    • config 配置
  • Python脚本系统
    • 技术分析
    • 使用api
  • Cpp脚本系统
    • 技术分析
  • 技术文档 & 心得体会
    • 数学
      • 坐标系、UV与深度范围
      • 行主序 与 列主序
    • 路径管理
    • 构建系统
    • 自定义资源格式
    • UI
      • undo/redo
      • 分辨率处理
    • ECS 系统
    • 插件系统
    • 数学库
    • Ref Counted
    • 音频
    • ChatGPT
    • Mesh、Vertex 等组织关系
    • 编辑器热更新方案
    • Profile
    • NLP
    • RenderDoc
    • CodeGen与反射系统
    • 安装包
    • 物理引擎
      • PhysX集成
      • Bullet集成
    • 动画
  • 图形后端
    • 坐标系差异
    • Feature差异
    • RHI 封装
    • Shader与Constant Buffer
    • DX12
    • Vulkan
    • Render Graph
    • 渲染整体架构
  • 图形Feature
    • 毛发
    • 鼠标拾取
    • 实例化渲染
  • Shader
    • Shader 交叉编译
    • Shader Toy
    • Shader 热更新
    • PBR
  • 打包
    • 打包
  • Bug 记录 & 解决过程
    • 闪退记录汇总
    • 导入图片显示混乱
    • D3D下glfw+imgui失效
  • 其他资料
    • 总结集合
Powered by GitBook
On this page
  • 参考资料
  • IBL
  1. Shader

PBR

参考资料

主要参考 Google 做的 Filament:

https://jerkwin.github.io/filamentcn/Filament.md.html#%E5%85%B3%E4%BA%8E

https://zhuanlan.zhihu.com/p/408636637

https://zhuanlan.zhihu.com/p/144154532

https://github.com/google/filament

https://google.github.io/filament/

https://google.github.io/filament/Filament.html#overview/physicallybasedrendering

IBL

image based lights,同样分为漫反射部分和镜面反射部分,最简单的即learnopengl的方法:

https://learnopengl-cn.github.io/07%20PBR/03%20IBL/01%20Diffuse%20irradiance/

https://learnopengl-cn.github.io/07%20PBR/03%20IBL/02%20Specular%20IBL/

这里漫反射部分需要预计算出irradiance map,镜面反射部分需要预计算出prefilter map。也就是说,使用一张hdr环境贴图,光ibl我们就需要额外计算出两张贴图!(LUT贴图是公共的)

我们不希望额外弄出更多的贴图存储,一是效率二是内存三是便利程度。幸好有其他的方法可以避开。首先是漫反射部分,我们可以用球谐来替代irradiance map;其次是镜面反射部分,我们可以直接用mipmap采样(samplelevel)来避开prefilter,可以参考:

https://zhuanlan.zhihu.com/p/463309766

https://google.github.io/filament/Filament.html#lighting/imagebasedlights

PreviousShader 热更新Next打包

Last updated 1 year ago