<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>渲染引擎 on PlumePHP</title><link>https://plumephp.com/tags/%E6%B8%B2%E6%9F%93%E5%BC%95%E6%93%8E/</link><description>Recent content in 渲染引擎 on PlumePHP</description><generator>Hugo</generator><language>zh-CN</language><lastBuildDate>Wed, 14 Oct 2026 00:00:00 +0800</lastBuildDate><atom:link href="https://plumephp.com/tags/%E6%B8%B2%E6%9F%93%E5%BC%95%E6%93%8E/index.xml" rel="self" type="application/rss+xml"/><item><title>《游戏引擎实现原理》10.1 材质模型与参数</title><link>https://plumephp.com/helio-render-10-1-material-model-params/</link><pubDate>Wed, 07 Oct 2026 14:00:00 +0800</pubDate><guid>https://plumephp.com/helio-render-10-1-material-model-params/</guid><description>把材质拆成「模型（参数声明）+ 实例（参数值）」两层，按 std140 算出每个参数的字节偏移并打包成 uniform buffer；再在 headless Chromium 里把它绑进管线、渲染一帧、回读中心像素，断言它就是 baseColor。</description></item><item><title>《游戏引擎实现原理》10.2 着色器变体与宏</title><link>https://plumephp.com/helio-render-10-2-shader-variants-macros/</link><pubDate>Wed, 07 Oct 2026 14:00:00 +0800</pubDate><guid>https://plumephp.com/helio-render-10-2-shader-variants-macros/</guid><description>WGSL 没有预处理器，材质却要在多种开关组合下生成不同程序。这一节实现一个只认 #ifdef / #ifndef / #else / #endif 的行级宏展开器，把一份模板裁剪成具体变体，并在 headless Chromium 里逐个编译验证 0 error。</description></item><item><title>《游戏引擎实现原理》10.3 变体爆炸与编译缓存</title><link>https://plumephp.com/helio-render-10-3-variant-explosion-cache/</link><pubDate>Wed, 07 Oct 2026 14:00:00 +0800</pubDate><guid>https://plumephp.com/helio-render-10-3-variant-explosion-cache/</guid><description>六个开关朴素地给出 2^6=64 个着色器变体，但特性之间有依赖，真实可达集只有 32 个。这一节按依赖枚举可达变体、用内容寻址（源码 + 开关集合的哈希）给编译结果去重，并在 headless Chromium 里把全部可达变体编译一遍，验证 0 error、非法组合会被拒。</description></item><item><title>《游戏引擎实现原理》11.1 WGSL 组织与 include</title><link>https://plumephp.com/helio-render-11-1-wgsl-organization-include/</link><pubDate>Wed, 07 Oct 2026 14:00:00 +0800</pubDate><guid>https://plumephp.com/helio-render-11-1-wgsl-organization-include/</guid><description>WGSL 没有 #include，但引擎要把公共函数拆成多个文件复用：本节在 createShaderModule() 之前做一层文本级 include 展开，处理递归、去重与循环检测，并真跑一次编译与像素回读，验证拼接后的模块确实可编译可用。</description></item><item><title>《游戏引擎实现原理》11.2 反射驱动的参数绑定</title><link>https://plumephp.com/helio-render-11-2-reflection-driven-binding/</link><pubDate>Wed, 07 Oct 2026 14:00:00 +0800</pubDate><guid>https://plumephp.com/helio-render-11-2-reflection-driven-binding/</guid><description>uniform 结构体在 CPU 侧要按完全一致的内存布局填充，手写偏移是 bug 温床：本节从 WGSL 的 struct 反射出每个成员的偏移与整个缓冲区大小，按该布局自动打包参数，并真跑一次渲染回读像素，验证绑定确实生效，偏移对了像素才会对。</description></item><item><title>《游戏引擎实现原理》11.3 着色器调试与错误定位（getCompilationInfo）</title><link>https://plumephp.com/helio-render-11-3-shader-debug-compilation-info/</link><pubDate>Wed, 07 Oct 2026 14:00:00 +0800</pubDate><guid>https://plumephp.com/helio-render-11-3-shader-debug-compilation-info/</guid><description>着色器写错时报错只有一行天书，定位全靠猜：本节真跑 getCompilationInfo()，拿到带行号、列号与字符偏移的诊断，并用 11.1 的 include 行映射把它还原成原始文件的文件:行:列，让编辑器能一键跳到出错的那一行源码。</description></item><item><title>《游戏引擎实现原理》12.1 光照模型与着色路径</title><link>https://plumephp.com/helio-render-12-1-lighting-model-path/</link><pubDate>Wed, 07 Oct 2026 14:00:00 +0800</pubDate><guid>https://plumephp.com/helio-render-12-1-lighting-model-path/</guid><description>光照不是一句「乘以点积」，而是「法线 + 光方向 + 视线 + 材质」到一根颜色的映射。本节在 helio 里从零实现 Lambert、Blinn-Phong、GGX 三条着色路径的 CPU 参考，再原样搬进 WGSL，在真实 WebGPU 设备上渲染球体并回读像素，要求 CPU 与 GPU 逐个字节对齐。</description></item><item><title>《游戏引擎实现原理》12.2 光源类型与衰减</title><link>https://plumephp.com/helio-render-12-2-light-types-attenuation/</link><pubDate>Wed, 07 Oct 2026 14:00:00 +0800</pubDate><guid>https://plumephp.com/helio-render-12-2-light-types-attenuation/</guid><description>上一节把着色路径打通，这一节解决「光从哪来、怎么变弱」。方向光没有距离衰减，点光用 UE4 的窗口化反平方，聚光再叠一个锥形衰减。本节在 helio 里实现三类光源的衰减公式，并用一个 compute 着色器在真实 WebGPU 设备上回读每个距离的衰减值，与 CPU 参考逐样本比对。</description></item><item><title>《游戏引擎实现原理》12.3 集群光照的引擎侧装配</title><link>https://plumephp.com/helio-render-12-3-clustered-lighting-assembly/</link><pubDate>Wed, 07 Oct 2026 14:00:00 +0800</pubDate><guid>https://plumephp.com/helio-render-12-3-clustered-lighting-assembly/</guid><description>上一节把单个光源的衰减算清楚，但场景里往往有上百个光源，逐物体遍历全部光源太贵。集群光照把视图空间切成三维网格，每个集群预存一份命中的光源列表。本节在 helio 里实现集群网格与光源装配的 CPU 参考，再用 compute 着色器在真实 WebGPU 设备上复算并逐集群比对。</description></item><item><title>《游戏引擎实现原理》13.1 阴影贴图的引擎侧实现</title><link>https://plumephp.com/helio-render-13-1-shadow-map-engine-side/</link><pubDate>Wed, 07 Oct 2026 14:00:00 +0800</pubDate><guid>https://plumephp.com/helio-render-13-1-shadow-map-engine-side/</guid><description>光照决定物体长什么样，阴影决定它站在哪。本节在 helio 上从零实现阴影贴图：先从光源视角把遮挡物渲染成一张光空间深度图，再把相机视角的地面点投影回光源空间做深度比较，最后在真实 WebGPU 设备上回读像素，与 CPU 解析参考逐点比对。</description></item><item><title>《游戏引擎实现原理》13.2 级联阴影与投影矩阵拟合</title><link>https://plumephp.com/helio-render-13-2-cascaded-shadow-fit/</link><pubDate>Wed, 07 Oct 2026 14:00:00 +0800</pubDate><guid>https://plumephp.com/helio-render-13-2-cascaded-shadow-fit/</guid><description>一张固定分辨率的阴影贴图罩住整个视锥，近处必然糊、远处必然浪费。级联阴影把视锥沿深度切成几级，每级单独拟合一个光源空间正交盒，并在相机移动时把正交盒对齐到 texel 网格。本节在 helio 里实现切分、角点提取与拟合，再在 GPU 上复算逐级联的包围盒。</description></item><item><title>《游戏引擎实现原理》13.3 阴影性能与质量权衡</title><link>https://plumephp.com/helio-render-13-3-shadow-perf-quality/</link><pubDate>Wed, 07 Oct 2026 14:00:00 +0800</pubDate><guid>https://plumephp.com/helio-render-13-3-shadow-perf-quality/</guid><description>阴影的两大旋钮——每像素采样数与深度偏置——分别换质量和换成本。PCF 半径从 1 到 3 让采样数按平方增长，把硬边软化成柔化像素；偏置从 0 往上加能压住自遮挡粉刺，但加过头阴影就脱离接触点。本节在 helio 里实现采样核与斜率缩放偏置，并在 GPU 上量化这两条权衡曲线。</description></item><item><title>《游戏引擎实现原理》14.1 Pass 依赖与资源生命周期</title><link>https://plumephp.com/helio-render-14-1-pass-dependency-lifetime/</link><pubDate>Wed, 07 Oct 2026 14:00:00 +0800</pubDate><guid>https://plumephp.com/helio-render-14-1-pass-dependency-lifetime/</guid><description>帧图不是一张画出来的图，而是一组 Pass 与它们读写资源的声明。本节在 helio 里从零实现帧图的 IR：把「谁读什么、谁写什么」翻译成数据流依赖与三类 hazard，跑拓扑排序排出执行序，再算出每个资源的生命周期区间，为后面的内存规划与执行打底。</description></item><item><title>《游戏引擎实现原理》14.2 WebGPU 约束下的帧图</title><link>https://plumephp.com/helio-render-14-2-framegraph-webgpu-constraints/</link><pubDate>Wed, 07 Oct 2026 14:00:00 +0800</pubDate><guid>https://plumephp.com/helio-render-14-2-framegraph-webgpu-constraints/</guid><description>Vulkan 类 API 的帧图要替开发者插屏障、把瞬态资源别名进共享显存；WebGPU 把这两件事整个从 API 里拿掉了——同步在 pass 边界隐式完成，纹理也没有别名入口。本节在 helio 里把这个约束差异量化：同一批瞬态资源，别名规划器给出两种显存占用，再在真实设备上跑通一条三 Pass 链。</description></item><item><title>《游戏引擎实现原理》14.3 帧图的编译与执行</title><link>https://plumephp.com/helio-render-14-3-framegraph-compile-execute/</link><pubDate>Wed, 07 Oct 2026 14:00:00 +0800</pubDate><guid>https://plumephp.com/helio-render-14-3-framegraph-compile-execute/</guid><description>帧图编译成执行计划只有三步：拓扑排序定顺序、给每个资源分配槽位、把 Pass 的读写原样带上。本节在 helio 里把这三步写成纯 CPU 的编译器，再让浏览器侧的执行器只按计划录命令，把一条乱序声明的三 Pass 帧图跑出正确像素，验证「声明序」与「执行序」彻底解耦。</description></item><item><title>《游戏引擎实现原理》15.1 全屏 Pass 链</title><link>https://plumephp.com/helio-render-15-1-fullscreen-pass-chain/</link><pubDate>Wed, 07 Oct 2026 14:00:00 +0800</pubDate><guid>https://plumephp.com/helio-render-15-1-fullscreen-pass-chain/</guid><description>后处理是一串全屏 pass：每个 pass 读若干张纹理、写一张纹理。本节在 helio 上从零搭出全屏 Pass 链的数据模型——覆盖整个视口的全屏三角形、pass 描述符、链合法性校验，以及用「最后一次使用」回收中间纹理的物理纹理规划，再在真实 WebGPU 设备上跑一条两段链、回读像素逐通道验证。</description></item><item><title>《游戏引擎实现原理》15.2 色调映射与抗锯齿接入</title><link>https://plumephp.com/helio-render-15-2-tonemap-antialias/</link><pubDate>Wed, 07 Oct 2026 14:00:00 +0800</pubDate><guid>https://plumephp.com/helio-render-15-2-tonemap-antialias/</guid><description>场景 pass 输出的是线性 HDR，显示器要的是 [0,1] 的 LDR，中间隔着色调映射；锯齿则要在边缘上做文章。本节在 helio 里把 Reinhard、ACES、filmic 三个算子与一次 5 邻域 FXAA 接成后处理链上的两个 pass，并在真实 WebGPU 设备上验证 GPU 结果与 CPU 算子逐像素一致。</description></item><item><title>《游戏引擎实现原理》15.3 后处理链的性能预算</title><link>https://plumephp.com/helio-render-15-3-postprocess-budget/</link><pubDate>Wed, 07 Oct 2026 14:00:00 +0800</pubDate><guid>https://plumephp.com/helio-render-15-3-postprocess-budget/</guid><description>后处理链的代价可以提前算出来：每个全屏 pass 都要把纹理读一遍、写一遍，这就是带宽。本节在 helio 里实现一份带宽账本，把 pass 的读写字节按格式与分辨率算清楚，再在真实 WebGPU 设备上实测 1/5/13 抽样三个全屏 pass 的每帧耗时，看成本到底由「固定开销」还是「像素数」主导。</description></item><item><title>《游戏引擎实现原理》16.1 精灵批次与图集</title><link>https://plumephp.com/helio-render-16-1-sprite-batch-atlas/</link><pubDate>Wed, 07 Oct 2026 14:00:00 +0800</pubDate><guid>https://plumephp.com/helio-render-16-1-sprite-batch-atlas/</guid><description>2D 与 UI 渲染的第一个问题是「一张界面里成百上千个精灵怎么画」。本节先把小图打进一张 2 次幂图集（货架装箱），再用一条精灵批次键把同层同深度的同页精灵并成一次绘制：10 万个精灵在单页图集下只剩 16 次绘制，最后在真实 WebGPU 设备上跑出一次 draw(6,2) 从图集采出红蓝两个精灵。</description></item><item><title>《游戏引擎实现原理》16.2 SDF 文本与矢量 UI</title><link>https://plumephp.com/helio-render-16-2-sdf-text-vector-ui/</link><pubDate>Wed, 07 Oct 2026 14:00:00 +0800</pubDate><guid>https://plumephp.com/helio-render-16-2-sdf-text-vector-ui/</guid><description>文字和矢量图形由曲线定义，位图放大会糊、图集也装不下任意字号。本节用有向距离场（SDF）把形状变成一段距离函数：距离直接转成抗锯齿覆盖率，一个全屏三角形就能画出边缘半透明的圆角矩形，任意放大都不糊。CPU 参考与 WGSL 逐字对齐，跑出中心全白、角外全黑、边界 128 的真实像素。</description></item><item><title>《游戏引擎实现原理》16.3 UI 与 3D 的合成顺序</title><link>https://plumephp.com/helio-render-16-3-ui-3d-composite-order/</link><pubDate>Wed, 07 Oct 2026 14:00:00 +0800</pubDate><guid>https://plumephp.com/helio-render-16-3-ui-3d-composite-order/</guid><description>精灵和矢量图形都能画了，但它们和 3D 世界还没有规矩：谁先画、谁压在谁上面、半透明怎么混。本节把一帧的绘制定成三段——3D 不透明近到远、3D 透明远到近、UI 永远在最上——再在同一个 render pass 里先画 3D 绿底、再用 alpha 混合叠上左半屏的红色 UI，回读出 0.5 红加 0.5 绿的真实像素。</description></item><item><title>《游戏引擎实现原理》17.1 渲染线程模型与命令缓冲</title><link>https://plumephp.com/helio-render-17-1-render-thread-command-buffer/</link><pubDate>Wed, 07 Oct 2026 14:00:00 +0800</pubDate><guid>https://plumephp.com/helio-render-17-1-render-thread-command-buffer/</guid><description>主线程一边跑游戏逻辑一边录渲染命令，逻辑一卡帧就掉。本节把录制与提交拆到渲染线程上：主线程只往命令缓冲里塞命令，渲染线程按帧取走执行，用一个双缓冲的生产消费环把「还没消费完就覆写」变成一条确定性异常，并跑出背压的真实时间线，看清三缓冲比双缓冲多出的那一份缓冲垫换来了什么。</description></item><item><title>《游戏引擎实现原理》17.2 OffscreenCanvas 与并行命令录制</title><link>https://plumephp.com/helio-render-17-2-offscreen-canvas-parallel-record/</link><pubDate>Wed, 07 Oct 2026 14:00:00 +0800</pubDate><guid>https://plumephp.com/helio-render-17-2-offscreen-canvas-parallel-record/</guid><description>上一节把命令缓冲做成了一条跨线程通道，但录制本身还是串行的。本节用 OffscreenCanvas 把渲染表面搬离主线程，再把一帧的命令拆成多条独立编码器分别录制、按提交顺序合并，在真实 WebGPU 设备上验证「两条命令缓冲」与「单编码器两趟」逐字节一致。</description></item><item><title>《游戏引擎实现原理》17.3 与 Job System 的对接</title><link>https://plumephp.com/helio-render-17-3-job-system-integration/</link><pubDate>Wed, 07 Oct 2026 14:00:00 +0800</pubDate><guid>https://plumephp.com/helio-render-17-3-job-system-integration/</guid><description>命令缓冲通道有了、独立编码器拆分也验证了，但谁来切块、谁来合并还没着落。本节把「分块 → 并行录 → 合并」接到卷一那套 Job System 上：用确定性调度模型算 makespan，再用 worker_threads 真跑，实测 4 worker 把 4096 个绘制项的录制墙钟压到约 2.7 分之一，且校验和与串行完全一致。</description></item><item><title>《游戏引擎实现原理》18.1 渲染器装配与场景接入</title><link>https://plumephp.com/helio-render-18-1-renderer-assembly-scene/</link><pubDate>Wed, 07 Oct 2026 14:00:00 +0800</pubDate><guid>https://plumephp.com/helio-render-18-1-renderer-assembly-scene/</guid><description>前十七章把 RHI、资源、场景、剔除、排序、光照、帧图、后处理、2D 与多线程各自做成了零件。本节是综合章的第一节，把这些零件装配成一条「纯数据场景 → 帧计划」的流水线，并在真实 WebGPU 设备上把这份帧计划画出来、回读像素，验证整条链路能跑出真实结果。</description></item><item><title>《游戏引擎实现原理》18.2 昼夜循环与光照表现</title><link>https://plumephp.com/helio-render-18-2-day-night-lighting/</link><pubDate>Wed, 07 Oct 2026 14:00:00 +0800</pubDate><guid>https://plumephp.com/helio-render-18-2-day-night-lighting/</guid><description>把「一天中的时刻」映射成一组可直接喂给光照的参数：太阳方向、太阳颜色、天空天顶与地平线颜色、环境光强度。本节在 helio 里从零实现这套映射，再把它原样搬进 WGSL，渲染一天三个时刻的天空并回读像素，要求 CPU 与 GPU 逐像素对齐。</description></item><item><title>《游戏引擎实现原理》18.3 渲染性能剖析与收口</title><link>https://plumephp.com/helio-render-18-3-render-profiling-wrapup/</link><pubDate>Wed, 07 Oct 2026 14:00:00 +0800</pubDate><guid>https://plumephp.com/helio-render-18-3-render-profiling-wrapup/</guid><description>画面能画、能动了，但「动得好不好」要用数字说话。本节给 18.1 的装配流水线做 CPU 逐帧计时，再用 WebGPU 的 timestamp-query 在渲染通道两端打时间戳、读出真实 GPU 纳秒数，跑出可复现的毫秒数字，最后为整卷《渲染引擎》收口。</description></item><item><title>《游戏引擎实现原理》1.1 一帧都发生了什么（CPU / GPU 时间线）</title><link>https://plumephp.com/helio-render-01-1-frame-timeline/</link><pubDate>Tue, 06 Oct 2026 14:00:00 +0800</pubDate><guid>https://plumephp.com/helio-render-01-1-frame-timeline/</guid><description>渲染器的第一课不是画三角形，而是搞清楚一帧里 CPU 和 GPU 谁在等谁。本节用离散事件模型模拟 CPU 提交与 GPU 执行的流水线，算出单/双/三缓冲下的稳态帧率与延迟，再在真实 WebGPU 设备上量出 CPU 提交与 GPU 排空的耗时，用数字说明为什么「CPU 帧」与「GPU 帧」不是同一件事。</description></item><item><title>《游戏引擎实现原理》1.2 渲染器的分层：RHI / 渲染器 / 场景</title><link>https://plumephp.com/helio-render-01-2-renderer-layers/</link><pubDate>Tue, 06 Oct 2026 14:00:00 +0800</pubDate><guid>https://plumephp.com/helio-render-01-2-renderer-layers/</guid><description>上一节看到 CPU 与 GPU 是两条流水线，那渲染器该怎样分层来管好它们？本节把渲染器拆成 RHI（硬件接口）、渲染器（帧组织）、场景（数据）三层，给出 helio 的目录与接口草图，并用一个可运行的依赖方向守卫，把「只能向下、不能成环」这条铁律钉成编译器与测试都能把关的断言。</description></item><item><title>《游戏引擎实现原理》1.3 与 graphics 专题的分工表</title><link>https://plumephp.com/helio-render-01-3-scope-vs-graphics/</link><pubDate>Tue, 06 Oct 2026 14:00:00 +0800</pubDate><guid>https://plumephp.com/helio-render-01-3-scope-vs-graphics/</guid><description>本卷和站内 graphics 专题到底谁写什么？本节用一张逐条对照的三列表，把 graphics 的 16 篇文章各自负责的算法与原理，和本卷只做的「在 helio RHI 上实现并跑出真实产物」一一对齐，并把这张表编码成一个可运行的路由函数，让「越界」变成一条可断言的失败用例，而不是一句口号。</description></item><item><title>《游戏引擎实现原理》2.1 为什么要 RHI：多后端与平台差异</title><link>https://plumephp.com/helio-render-02-1-why-rhi/</link><pubDate>Tue, 06 Oct 2026 14:00:00 +0800</pubDate><guid>https://plumephp.com/helio-render-02-1-why-rhi/</guid><description>从零实现渲染器的第一件事是划一条硬件抽象线。本节讲清 WebGPU、WebGL2 与 NullRHI 三个后端在特性、格式与上限上的真实差异，给出 helio 的 RHI 统一词汇（仅类型接口），并用一张能力查询表把「能不能做 X」变成一次查表，最后在 headless 浏览器里真探测一次设备的 limits。</description></item><item><title>《游戏引擎实现原理》2.2 资源对象：缓冲、纹理、采样器</title><link>https://plumephp.com/helio-render-02-2-resource-objects/</link><pubDate>Tue, 06 Oct 2026 14:00:00 +0800</pubDate><guid>https://plumephp.com/helio-render-02-2-resource-objects/</guid><description>渲染层的一切最终都是三类 GPU 资源：缓冲、纹理、采样器。本节给出 helio 的资源描述符与使用标志（与 WebGPU 逐位一致），用纯逻辑校验行距对齐与 mip 链长度，再在真实 WebGPU 上创建一块 buffer、写入、读回，逐字节断言两条上传路径的结果一致。</description></item><item><title>《游戏引擎实现原理》2.3 管线状态对象与着色器模块</title><link>https://plumephp.com/helio-render-02-3-pipeline-state-shader-module/</link><pubDate>Tue, 06 Oct 2026 14:00:00 +0800</pubDate><guid>https://plumephp.com/helio-render-02-3-pipeline-state-shader-module/</guid><description>一条管线状态对象把顶点布局、图元拓扑、深度与混合状态、绑定布局全部钉死；着色器模块则是它的 vertex / fragment 两半。本节给出 helio 的 PSO 描述符，然后在真实 WebGPU 上真编译一份 WGSL，断言 getCompilationInfo() 零错误，再故意写错一处，验证诊断能定位到具体行列。</description></item><item><title>《游戏引擎实现原理》3.1 命令编码器与渲染通道</title><link>https://plumephp.com/helio-render-03-1-command-encoder-render-pass/</link><pubDate>Tue, 06 Oct 2026 14:00:00 +0800</pubDate><guid>https://plumephp.com/helio-render-03-1-command-encoder-render-pass/</guid><description>命令编码器把一帧的 GPU 工作录成命令缓冲：beginRenderPass 开通道、setPipeline 绑管线、draw 提交绘制、end 收尾。本节先用纯 TypeScript 把这套顺序约束做成可断言的录制器状态机，再在真实 WebGPU 设备上录一条渲染通道，清屏后画三角形并把像素回读出来验证。</description></item><item><title>《游戏引擎实现原理》3.2 队列提交、帧同步与 fence</title><link>https://plumephp.com/helio-render-03-2-queue-submit-fence/</link><pubDate>Tue, 06 Oct 2026 14:00:00 +0800</pubDate><guid>https://plumephp.com/helio-render-03-2-queue-submit-fence/</guid><description>queue.submit 只是把命令缓冲排进 GPU 的队列，真正「做完了」要靠 fence 通知 CPU。本节说清 GPU 与 CPU 的同步点在哪，用纯 TypeScript 实现一个记录在飞帧的 FrameRing，并写出「每帧 await」与「流水线」两种策略的确定性时间线，实测出两者的吞吐差异。</description></item><item><title>《游戏引擎实现原理》3.3 三缓冲与资源生命周期</title><link>https://plumephp.com/helio-render-03-3-triple-buffering-lifetime/</link><pubDate>Tue, 06 Oct 2026 14:00:00 +0800</pubDate><guid>https://plumephp.com/helio-render-03-3-triple-buffering-lifetime/</guid><description>GPU 可能还在读帧 N 的 uniform，而 CPU 已经在写帧 N+1——直接复用同一块 buffer 会画错。本节解释为什么需要 2~3 份 uniform buffer 与 bind group，并用纯 TypeScript 实现一个环形分配的三缓冲池，在复用仍在飞的槽位时立刻报错，把竞态变成可断言的异常。</description></item><item><title>《游戏引擎实现原理》4.1 资源绑定与 bind group</title><link>https://plumephp.com/helio-render-04-1-bind-group/</link><pubDate>Tue, 06 Oct 2026 14:00:00 +0800</pubDate><guid>https://plumephp.com/helio-render-04-1-bind-group/</guid><description>着色器怎么知道去哪拿 uniform、贴图和采样器？本节讲 BindGroupLayout 与 BindGroup 如何和 WGSL 里的 @group/@binding 一一对应，先写一个从着色器注解反射出布局的纯 TS 模块，再在真实 WebGPU 上跑通「uniform + texture + sampler」三合一绑定并回读像素验证。</description></item><item><title>《游戏引擎实现原理》4.2 上传、暂存与 mipmap 生成</title><link>https://plumephp.com/helio-render-04-2-upload-staging-mipmap/</link><pubDate>Tue, 06 Oct 2026 14:00:00 +0800</pubDate><guid>https://plumephp.com/helio-render-04-2-upload-staging-mipmap/</guid><description>上一节把资源绑进了管线，但资源本身还没进 GPU。本节讲 writeTexture 与 copyBufferToTexture 两条上传路径，撞上 WebGPU 最著名的 bytesPerRow 必须对齐 256 字节的坑并抓出真实报错，再用一条 textureLoad 的 box filter 通道逐级生成 mipmap 并回读断言。</description></item><item><title>《游戏引擎实现原理》4.3 GPU 内存池与预算</title><link>https://plumephp.com/helio-render-04-3-gpu-memory-pool-budget/</link><pubDate>Tue, 06 Oct 2026 14:00:00 +0800</pubDate><guid>https://plumephp.com/helio-render-04-3-gpu-memory-pool-budget/</guid><description>资源能传上去之后，一帧里反复创建销毁 buffer/texture 会把驱动拖垮、把显存切碎。本节复用卷一的大小类思路做一个 GPU 内存池，配显式预算与超限策略，统计复用率与峰值占用，并在真实 WebGPU 设备上跑三帧验证第 2/3 帧确实复用了第 1 帧创建的 buffer。</description></item><item><title>《游戏引擎实现原理》5.1 WebGPU 后端实现</title><link>https://plumephp.com/helio-render-05-1-webgpu-backend/</link><pubDate>Tue, 06 Oct 2026 14:00:00 +0800</pubDate><guid>https://plumephp.com/helio-render-05-1-webgpu-backend/</guid><description>helio 的 RHI 抽象在 WebGPU 上的落地：把资源、管线、命令、绑定四组接口逐条翻译成 WebGPU 调用，用自增整数句柄隔离后端细节，并真跑一次创建资源、录制渲染通道、提交队列、回读像素的完整流程，断言中心像素与清屏角像素，作为后端正确性的最小证据。</description></item><item><title>《游戏引擎实现原理》5.2 WebGL2 后端实现与能力降级</title><link>https://plumephp.com/helio-render-05-2-webgl2-backend-capability/</link><pubDate>Tue, 06 Oct 2026 14:00:00 +0800</pubDate><guid>https://plumephp.com/helio-render-05-2-webgl2-backend-capability/</guid><description>同一套 RHI 接口的 WebGL2 实现：把 bind group 映射成 uniform block 与 texture unit、render pass 映射成 framebuffer object、WGSL 换成 GLSL ES 3.0。更关键的是能力降级——WebGPU 有而 WebGL2 没有的特性如何优雅退化，并用 clearColor 加 readPixels 真跑出像素断言。</description></item><item><title>《游戏引擎实现原理》5.3 NullRHI：记录式假后端与测试</title><link>https://plumephp.com/helio-render-05-3-null-rhi-record-test/</link><pubDate>Tue, 06 Oct 2026 14:00:00 +0800</pubDate><guid>https://plumephp.com/helio-render-05-3-null-rhi-record-test/</guid><description>NullRHI 是 helio 的第三个后端：它不接触 GPU，把每一次 RHI 调用按顺序记进日志。于是渲染代码的调用序列变成可在 Node 里断言的纯数据，单测与 CI 不需要显卡、也不会因驱动差异而抖动。本节用同一段渲染代码分别跑 WebGPU 与 NullRHI，断言后者产出的调用日志。</description></item><item><title>《游戏引擎实现原理》6.1 顶点格式、属性布局与程序化网格</title><link>https://plumephp.com/helio-render-06-1-vertex-format-procedural-mesh/</link><pubDate>Tue, 06 Oct 2026 14:00:00 +0800</pubDate><guid>https://plumephp.com/helio-render-06-1-vertex-format-procedural-mesh/</guid><description>把顶点描述成「格式 → 偏移 → arrayStride → shaderLocation」这条可运行的数据链：写出 helio 的顶点布局模块，用它程序化生成《微光岛》一块低多边形地形，并在 headless Chromium 里上传、回读、重算包围盒。</description></item><item><title>《游戏引擎实现原理》6.2 纹理格式、压缩与 mipmap</title><link>https://plumephp.com/helio-render-06-2-texture-format-compression-mipmap/</link><pubDate>Tue, 06 Oct 2026 14:00:00 +0800</pubDate><guid>https://plumephp.com/helio-render-06-2-texture-format-compression-mipmap/</guid><description>把纹理的显存账算清楚：颜色 / sRGB / 深度格式各占多少字节、BC / ETC2 / ASTC 三族块压缩如何取舍、mipmap 链为什么让显存多出约三分之一；并实测 WebGPU 上哪些压缩格式必须靠扩展才能创建、哪些属于核心格式开箱即用。</description></item><item><title>《游戏引擎实现原理》6.3 采样器、寻址与各向异性</title><link>https://plumephp.com/helio-render-06-3-sampler-addressing-anisotropy/</link><pubDate>Tue, 06 Oct 2026 14:00:00 +0800</pubDate><guid>https://plumephp.com/helio-render-06-3-sampler-addressing-anisotropy/</guid><description>采样器不占显存，却决定纹理越界、缩放、倾斜时怎么被读：clamp / repeat / mirror 三种寻址、nearest / linear 两种过滤、以及各向异性的收益与代价；并用同一张 4x1 纹理实测三种寻址模式下的边缘像素回读。</description></item><item><title>《游戏引擎实现原理》7.1 场景图与变换层级（ECS 之上的一层视图）</title><link>https://plumephp.com/helio-render-07-1-scene-graph-transform/</link><pubDate>Tue, 06 Oct 2026 14:00:00 +0800</pubDate><guid>https://plumephp.com/helio-render-07-1-scene-graph-transform/</guid><description>把 ECS 的扁平组件数组解释成一棵场景树：给每个实体补一个父索引，按拓扑序算出 world 矩阵，再展平成渲染器直接消费的实例列表，并在 headless Chromium 里用一次 instanced draw 画出全部实例、回读像素核对位置。</description></item><item><title>《游戏引擎实现原理》7.2 脏标记传播与 world matrix 缓存</title><link>https://plumephp.com/helio-render-07-2-dirty-flag-world-matrix/</link><pubDate>Tue, 06 Oct 2026 14:00:00 +0800</pubDate><guid>https://plumephp.com/helio-render-07-2-dirty-flag-world-matrix/</guid><description>给场景图加上脏标记：改动一个节点只把它的子树标脏，更新时只重算被标脏的节点、并在重复标记时提前停止，再用一组确定性访问计数与逐字节像素比较，证明「脏更新」与「全量重算」产出的世界矩阵逐位一致、渲染画面也完全相同，从而让每帧只付出真正改动的那部分代价。</description></item><item><title>《游戏引擎实现原理》7.3 相机、裁剪面与拾取射线</title><link>https://plumephp.com/helio-render-07-3-camera-frustum-ray/</link><pubDate>Tue, 06 Oct 2026 14:00:00 +0800</pubDate><guid>https://plumephp.com/helio-render-07-3-camera-frustum-ray/</guid><description>把相机拆成 view / projection / viewProj 三个矩阵，从 viewProj 免费抽出六个裁剪面，再由屏幕坐标沿相机基座构造世界空间拾取射线，最后在 headless Chromium 里点一下屏幕、验证拾取命中的正是那个实例。</description></item><item><title>《游戏引擎实现原理》8.1 视锥剔除与包围体</title><link>https://plumephp.com/helio-render-08-1-frustum-culling-bounds/</link><pubDate>Tue, 06 Oct 2026 14:00:00 +0800</pubDate><guid>https://plumephp.com/helio-render-08-1-frustum-culling-bounds/</guid><description>从相机的视图投影矩阵抽出六个裁剪面，用 p-vertex 判定 AABB 与包围球的可见性；先跑通 CPU 侧剔除统计，再在 headless Chromium 里只把可见盒子按实例绘制，回读帧缓冲逐色核对被剔除的盒子一个像素都没画出来，全程附可复现代码。</description></item><item><title>《游戏引擎实现原理》8.2 空间划分与 BVH</title><link>https://plumephp.com/helio-render-08-2-spatial-partition-bvh/</link><pubDate>Tue, 06 Oct 2026 14:00:00 +0800</pubDate><guid>https://plumephp.com/helio-render-08-2-spatial-partition-bvh/</guid><description>用最长轴中位数分割把十万个 AABB 建成扁平二叉 BVH，把逐盒的线性剔除换成层次遍历；再把叶节点 AABB 与图元 AABB 摊平上传，用两个 compute 通道做两级视锥剔除，回读掩码与 CPU 的 bvhCull 逐位比对，验证完全一致。</description></item><item><title>《游戏引擎实现原理》8.3 GPU 驱动剔除与 LOD 协同（compute + indirect）</title><link>https://plumephp.com/helio-render-08-3-gpu-driven-culling-lod/</link><pubDate>Tue, 06 Oct 2026 14:00:00 +0800</pubDate><guid>https://plumephp.com/helio-render-08-3-gpu-driven-culling-lod/</guid><description>把视锥剔除与 LOD 选择整体搬到 GPU：一个 compute 通道按包围球剔除、按距离选档，用原子计数器追加进对应 LOD 的实例缓冲，第二个通道写出三组 indirect 绘制参数；CPU 每帧只发三个 drawIndirect，并回读掩码与 CPU 逐对象比对验证一致。</description></item><item><title>《游戏引擎实现原理》9.1 排序键与前后绘制</title><link>https://plumephp.com/helio-render-09-1-sort-key-front-to-back/</link><pubDate>Tue, 06 Oct 2026 14:00:00 +0800</pubDate><guid>https://plumephp.com/helio-render-09-1-sort-key-front-to-back/</guid><description>把剔除后的可见项压进一条 32 位排序键：高 18 位决定批次归属、低 14 位决定前后顺序，再用稳定的 LSD 基数排序替代多字段比较器。在 20 万项的确定性场景上跑出三种排序的真实耗时对比，并正面校验不透明项确实近→远、透明项远→近。</description></item><item><title>《游戏引擎实现原理》9.2 状态缓存与冗余剔除</title><link>https://plumephp.com/helio-render-09-2-state-cache-redundancy/</link><pubDate>Tue, 06 Oct 2026 14:00:00 +0800</pubDate><guid>https://plumephp.com/helio-render-09-2-state-cache-redundancy/</guid><description>写一个后端无关的状态缓存，记住当前管线、绑定组、顶点与索引缓冲，只在真正变化时下发；在 20 万次绘制的乱序与排序两种流上跑出「应用 / 跳过」两路计数，看排序能把管线切换从 199157 次砍到 512 次、又砍不掉什么，为下一节的实例化合批埋下引子。</description></item><item><title>《游戏引擎实现原理》9.3 实例化与合批</title><link>https://plumephp.com/helio-render-09-3-instancing-batching/</link><pubDate>Tue, 06 Oct 2026 14:00:00 +0800</pubDate><guid>https://plumephp.com/helio-render-09-3-instancing-batching/</guid><description>9.2 的状态缓存砍不掉顶点缓冲的频繁切换，因为它按材质而非网格分组。这一节换一条把网格提到高位的批次键，把连续同网格的绘制并成一次实例化绘制：20 万次绘制在 64 网格场景降到 64 次，并跑出一次 draw(6,4) 画出四个彩色实例的真实像素。</description></item><item><title>《游戏引擎实现原理》渲染引擎 · 全书目录与章节索引（55 篇）</title><link>https://plumephp.com/posts/books/%E6%B8%B2%E6%9F%93%E5%BC%95%E6%93%8E/</link><pubDate>Tue, 06 Oct 2026 14:00:00 +0800</pubDate><guid>https://plumephp.com/posts/books/%E6%B8%B2%E6%9F%93%E5%BC%95%E6%93%8E/</guid><description>《游戏引擎实现原理》卷二《渲染引擎》全 55 篇，在卷一《引擎内核》的 helio 之上用 TypeScript 从零接出渲染引擎：从渲染架构总览与一帧的 CPU / GPU 时间线起步，经 RHI 抽象设计、命令与队列、GPU 资源与内存、WebGPU 与 WebGL2 多后端实现，再到几何与纹理资源、场景变换相机、可见性剔除与 LOD、排序与批次、材质与着色器、光照与阴影、帧图、后处理与全屏特效、2D 与 UI、多线程渲染，最后把全部零件装配成能画的渲染器，让《微光岛》在真实 GPU 上被完整画出来。</description></item><item><title>《游戏引擎实现原理》渲染引擎 目录</title><link>https://plumephp.com/helio-render-toc/</link><pubDate>Tue, 06 Oct 2026 14:00:00 +0800</pubDate><guid>https://plumephp.com/helio-render-toc/</guid><description>《游戏引擎实现原理》卷二《渲染引擎》全书导航页：说明本卷定位与卷一《引擎内核》的关系、本卷差异化（在 RHI 上从零实现、每节跑出真实产物、真实像素与计时结果），给出顺序通读、只读 RHI 四章、直奔帧图与后处理三条阅读路径，讲清 L1–L2 可运行性口径，并按五个部分列出 18 章 54 节的完整章节索引，另含周计划表与常见问题速查，方便读者按需定位、跳读与随时查阅。</description></item></channel></rss>