<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>Interludes on The Only Problem&#39;s Blog</title>
    <link>https://congyuxiaoyoudao.github.io/posts/interludes/</link>
    <description>Recent content in Interludes on The Only Problem&#39;s Blog</description>
    <generator>Hugo -- 0.157.0</generator>
    <language>en-us</language>
    <lastBuildDate>Tue, 19 Aug 2025 00:00:00 +0000</lastBuildDate>
    <atom:link href="https://congyuxiaoyoudao.github.io/posts/interludes/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Interlude 5. Poisson Reconstruction</title>
      <link>https://congyuxiaoyoudao.github.io/posts/interludes/poisson-reconstruction/</link>
      <pubDate>Tue, 19 Aug 2025 00:00:00 +0000</pubDate>
      <guid>https://congyuxiaoyoudao.github.io/posts/interludes/poisson-reconstruction/</guid>
      <description>&lt;hr&gt;
&lt;h2 id=&#34;0x00-to-begin-with&#34;&gt;0x00 To begin with&lt;/h2&gt;
&lt;p&gt;这篇文章将会包含以下内容：&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;input checked=&#34;&#34; disabled=&#34;&#34; type=&#34;checkbox&#34;&gt; 泊松重建的一些前置数学知识&lt;/li&gt;
&lt;li&gt;&lt;input checked=&#34;&#34; disabled=&#34;&#34; type=&#34;checkbox&#34;&gt; 泊松重建算法原理及推导过程&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;For reference&lt;/strong&gt;：&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;📺 







  
  &lt;a href=&#34;https://www.youtube.com/watch?v=nmvs0vrBT18&#34;&gt;Laplace&amp;rsquo;s Equation and Poisson&amp;rsquo;s Equation&lt;/a&gt;

&lt;/li&gt;
&lt;li&gt;📖 







  
  &lt;a href=&#34;https://www.zhihu.com/question/25481998&#34;&gt;如何通俗地理解拉普拉斯方程、泊松方程、亥姆霍兹方程？&lt;/a&gt;

&lt;/li&gt;
&lt;li&gt;📖 







  
  &lt;a href=&#34;https://zhuanlan.zhihu.com/p/107653198&#34;&gt;泊松表面重建详解&lt;/a&gt;

&lt;/li&gt;
&lt;li&gt;📃 







  
  &lt;a href=&#34;https://hhoppe.com/poissonrecon.pdf&#34;&gt;Poisson Surface Reconstruction&lt;/a&gt;

&lt;/li&gt;
&lt;/ul&gt;
&lt;hr&gt;
&lt;h2 id=&#34;0x01-隐函数表达-implicit-expression&#34;&gt;0x01 隐函数表达 Implicit Expression&lt;/h2&gt;
&lt;p&gt;表达一个三维曲面，例如球心位于原点、半径为 $r$ 的球面，可以使用球的标准方程：&lt;/p&gt;
&lt;div&gt;$$
F(x,y,z):x^{2}+y^{2}+z^{2}-r^{2}=0
$$&lt;/div&gt;
该方程（形如 $F(x,y,z)=0$）就定义了球面的隐函数表达，它将所有变量都放在等式一侧，隐含了因变量关于自变量的函数关系，在描述球面的情况下，$z$ 关于 $x,y$ 的关系可以显化为：
&lt;div&gt;$$
z=\sqrt{ r^{2}-x^{2}-y^{2} }
$$&lt;/div&gt;
这就是隐函数的一种显式表达，它描述球面在 $xOy$ 平面以上的部分。如果需要描述整个球面，还需要 $xOy$ 平面以下的部分：
&lt;div&gt;$$
z=-\sqrt{ r^{2}-x^{2}-y^{2} }
$$&lt;/div&gt;
也就是说显化的隐函数可能无法覆盖所有满足隐函数方程的解集，因为显函数是一一映射，而隐函数可能是一对多或者多对多的映射。
&lt;p&gt;在计算机图形学中，SDF 就是一种常用的可以描述表面的隐函数表达：&lt;/p&gt;
&lt;div&gt;$$
\phi(\mathbf{x})=\pm \text{dist}(\mathbf{x},\partial \Omega)
$$&lt;/div&gt;
SDF 以物体表面为界，空间中任意一点 $\mathbf{x}$ 的 SDF 函数值为与物体表面的带符号距离（物体内部为负、外部为正）。自然的，物体表面可以用 SDF 值为零的水平集描述：
&lt;div&gt;$$
\{\mathbf{x}\,|\,\phi(\mathbf{x})=0\}
$$&lt;/div&gt;
![使用 SDF 的零水平集描述表面，Jeong et.al](https://raw.gitmirror.com/congyuxiaoyoudao/Picgo-ImageBed/main/TA-interludes/Interlude%205.PoissonRecon/202508201058142.png#center)
&lt;hr&gt;
&lt;h2 id=&#34;0x02-泊松方程-poisson-equation&#34;&gt;0x02 泊松方程 Poisson Equation&lt;/h2&gt;
&lt;blockquote&gt;
&lt;p&gt;泊松表面重建其实不需要对泊松方程有什么很深刻的数学物理了解，笔者也非相关专业，所以就仅凭自己的想法写一点更为直观的解释&lt;/p&gt;</description>
    </item>
    <item>
      <title>Interlude 4. 在点云数据中估计法线</title>
      <link>https://congyuxiaoyoudao.github.io/posts/interludes/estimatenormals/</link>
      <pubDate>Wed, 02 Jul 2025 00:00:00 +0000</pubDate>
      <guid>https://congyuxiaoyoudao.github.io/posts/interludes/estimatenormals/</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;3DGS 的原论文中，每个高斯是不存法线信息的，然而后续工作中，也有研究人员将法线和 BRDF 信息进行训练，这样一来，就可以在后续的光栅化过程中输出 GBuffer，完成 relighting 的任务。生成初始法线，可以仅考虑高斯的均值，基于局部平面假设进行估计。&lt;/p&gt;
&lt;/blockquote&gt;
&lt;hr&gt;
&lt;h2 id=&#34;0x00-to-begin-with&#34;&gt;0x00 To begin with&lt;/h2&gt;
&lt;p&gt;这篇文章将会包含以下内容：&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;input checked=&#34;&#34; disabled=&#34;&#34; type=&#34;checkbox&#34;&gt; 什么是 PLY&lt;/li&gt;
&lt;li&gt;&lt;input checked=&#34;&#34; disabled=&#34;&#34; type=&#34;checkbox&#34;&gt; 利用最小二乘法估计点云法线&lt;/li&gt;
&lt;li&gt;&lt;input checked=&#34;&#34; disabled=&#34;&#34; type=&#34;checkbox&#34;&gt; 使用 PCL 的实现&lt;/li&gt;
&lt;li&gt;&lt;input checked=&#34;&#34; disabled=&#34;&#34; type=&#34;checkbox&#34;&gt; 在 CloudCompare 中实现&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;For reference&lt;/strong&gt;👇：&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;📖 







  
  &lt;a href=&#34;https://paulbourke.net/dataformats/ply/&#34;&gt;PLY - Polygon File Format&lt;/a&gt;

&lt;/li&gt;
&lt;li&gt;📖 







  
  &lt;a href=&#34;https://pointclouds.org/documentation/tutorials/normal_estimation.html&#34;&gt;Estimating Surface Normals in a PointCloud&lt;/a&gt;

&lt;/li&gt;
&lt;li&gt;📺 







  
  &lt;a href=&#34;https://www.youtube.com/watch?v=lco0yFWm1QQ&#34;&gt;Normal and Curvature Calculation for a Pointcloud&lt;/a&gt;

&lt;/li&gt;
&lt;li&gt;📃 







  
  &lt;a href=&#34;http://mediatum.ub.tum.de/doc/800632/941254.pdf&#34;&gt;http://mediatum.ub.tum.de/doc/800632/941254.pdf&lt;/a&gt;

&lt;/li&gt;
&lt;/ul&gt;
&lt;hr&gt;
&lt;h2 id=&#34;0x01-ply-格式&#34;&gt;0x01 PLY 格式&lt;/h2&gt;
&lt;p&gt;PLY（Polygon File Format, also known as the Stanford Triangle Format），是一种用于存储多边形集合的图形对象的格式。有两种子格式：&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;ASCII：ASCII 编码表示，直观易读&lt;/li&gt;
&lt;li&gt;Binary：二进制格式，存储空间小，能够快速保存和加载&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;PLY 文件的经典结构如下：&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;Header  // description field, containing element type, property and count
Vertex List  // list of data for each vertex
Face List  // list of data for each face
(List of other elements)
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Header 描述文件格式，评论（comment）以及每个元素的描述，并在其后指定该元素属性。例如一个以 ASCII 子格式保存的 PLY 文件，其 Header 如下：&lt;/p&gt;</description>
    </item>
    <item>
      <title>Interlude 3. WebGPU From Scratch</title>
      <link>https://congyuxiaoyoudao.github.io/posts/interludes/webgpu-from-scratch/</link>
      <pubDate>Mon, 30 Jun 2025 00:00:00 +0000</pubDate>
      <guid>https://congyuxiaoyoudao.github.io/posts/interludes/webgpu-from-scratch/</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;从导师那里听说了 WebGPU，做了点调查发现这个 API 还挺新的，正好之前只零零碎碎学了一点 OpenGL，相比于不适合人类学的 Vulkan，还是 WebGPU 显得友好一点。&lt;/p&gt;
&lt;/blockquote&gt;
&lt;hr&gt;
&lt;h2 id=&#34;-0x00-to-begin-with&#34;&gt;🚩 0x00 To begin with&lt;/h2&gt;
&lt;p&gt;这篇文章将会包含以下内容：&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;input checked=&#34;&#34; disabled=&#34;&#34; type=&#34;checkbox&#34;&gt; 什么是 WebGPU&lt;/li&gt;
&lt;li&gt;&lt;input checked=&#34;&#34; disabled=&#34;&#34; type=&#34;checkbox&#34;&gt; 配置 WebGPU 开发环境&lt;/li&gt;
&lt;li&gt;&lt;input checked=&#34;&#34; disabled=&#34;&#34; type=&#34;checkbox&#34;&gt; 第一个 WebGPU 项目：HelloTriangle！&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;For reference&lt;/strong&gt;👇：&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;🍪 







  
  &lt;a href=&#34;https://webgpu.github.io/webgpu-samples/&#34;&gt;WebGPU Samples&lt;/a&gt;

&lt;/li&gt;
&lt;li&gt;📖 







  
  &lt;a href=&#34;https://gpuweb.github.io/gpuweb/&#34;&gt;WebGPU API Spec&lt;/a&gt;

&lt;/li&gt;
&lt;li&gt;📖 







  
  &lt;a href=&#34;https://www.w3.org/TR/WGSL/&#34;&gt;WebGPU Shading Language&lt;/a&gt;

&lt;/li&gt;
&lt;li&gt;📺 







  
  &lt;a href=&#34;https://www.bilibili.com/video/BV1uu411B7uq/&#34;&gt;WebGPU小白入门（一）：如何零基础创建第一个WebGPU项目！&lt;/a&gt;

&lt;/li&gt;
&lt;li&gt;📖 







  
  &lt;a href=&#34;https://codelabs.developers.google.com/your-first-webgpu-app?hl=zh-cn&amp;amp;authuser=0#0&#34;&gt;您的第一个 WebGPU 应用&lt;/a&gt;

&lt;/li&gt;
&lt;li&gt;📖 







  
  &lt;a href=&#34;https://lil-gui.georgealways.com/&#34;&gt;lil-gui 0.20.0&lt;/a&gt;

&lt;/li&gt;
&lt;/ul&gt;
&lt;hr&gt;
&lt;h2 id=&#34;0x01-认识-webgpu&#34;&gt;0x01 认识 WebGPU&lt;/h2&gt;
&lt;p&gt;WebGPU 是一个由 W3C GPU 工作组制定的新的现代图形 API，用于在 Web 应用中访问 GPU 功能。&lt;/p&gt;
&lt;p&gt;在 WebGPU 出现之前，Web 端的图形编程应用主要采用 WebGL 和 WebGL 2，虽然它们有着跨平台能力和强大的社区支持，但架构过于古老，最新的 WebGL 2 只是封装了 2009 年 OpenGL 3.2 的实现。Khronos 也指出 WebGL 后续更新中不再引入现代 GPU 的新特性。&lt;/p&gt;</description>
    </item>
    <item>
      <title>Interlude 2. Manga Speed Lines</title>
      <link>https://congyuxiaoyoudao.github.io/posts/interludes/manga-speed-lines/</link>
      <pubDate>Mon, 31 Mar 2025 00:00:00 +0000</pubDate>
      <guid>https://congyuxiaoyoudao.github.io/posts/interludes/manga-speed-lines/</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;偶然用 shader 乱搓出的一个类似漫画风格的放射线效果，实际上还有很多缺陷，权且当思路分享了&lt;/p&gt;
&lt;/blockquote&gt;
&lt;hr&gt;
&lt;h2 id=&#34;-0x00-to-begin-with&#34;&gt;🚩 0x00 To begin with&lt;/h2&gt;
&lt;p&gt;这篇文章将会包含以下内容：&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;input checked=&#34;&#34; disabled=&#34;&#34; type=&#34;checkbox&#34;&gt; 漫画的速度线效果&lt;/li&gt;
&lt;li&gt;&lt;input checked=&#34;&#34; disabled=&#34;&#34; type=&#34;checkbox&#34;&gt; 基于 blender 着色器的乱糊&lt;/li&gt;
&lt;/ul&gt;
&lt;hr&gt;
&lt;h2 id=&#34;-0x01-what-is-radiating-lines&#34;&gt;👀 0x01 What is Radiating Lines&lt;/h2&gt;
&lt;p&gt;漫画中经常有这种放射线的效果：&lt;/p&gt;
&lt;p&gt;&lt;img loading=&#34;lazy&#34; src=&#34;https://raw.gitmirror.com/congyuxiaoyoudao/Picgo-ImageBed/main/TA-interludes/Interlude%202.MangaSpeedLines/202504021841792.jpg#center&#34;&gt;&lt;/p&gt;
&lt;p&gt;通常是用来表达角色情绪、物体速度感或突出画面重点，动漫中还会做出动画以增加表现力。但是如果不靠画（全凭程序化）怎么做呢？&lt;/p&gt;
&lt;p&gt;如果不限制工具的话思路很简单，在 PS 里先画一个渐变，再用波浪扭成间隔不等的尖刺状，最后转成极坐标就完事了。&lt;/p&gt;
&lt;p&gt;但是如果要用 shader 写的话就有点头疼了，主要是那种不规则的尖刺效果。我一开始想的是让 V 的起点在径向随机偏移，但 UV 毕竟是重复平铺的，极坐标一扭还是会窜到中心去，甚至 V 有没有都没关系。&lt;/p&gt;
&lt;p&gt;所以偏移 UV 的想法是不行了，我的做法是糊出一个遮罩（也是很邪门了）。&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id=&#34;-0x02-radiating-lines-放射线效果&#34;&gt;🕸️ 0x02 Radiating Lines 放射线效果&lt;/h2&gt;
&lt;p&gt;要做出放射的效果，首先得让 UV 位于模型的中心，以正方形平面为例，在映射中将 UV 同时减去 0.5，让 UV (0,0) 处位于模型中心。&lt;/p&gt;
&lt;p&gt;&lt;img loading=&#34;lazy&#34; src=&#34;https://raw.gitmirror.com/congyuxiaoyoudao/Picgo-ImageBed/main/TA-interludes/Interlude%202.MangaSpeedLines/202503312115356.png#center&#34;&gt;&lt;/p&gt;
&lt;p&gt;然后就是让 U 绕圆周环游一圈，现在的 UV 可以当成直角坐标系处理，很容易给出一个单位圆的方程：&lt;/p&gt;
&lt;div&gt;$$
u^2+v^2=1
$$&lt;/div&gt;
&lt;p&gt;然后算以 U 轴正方向为起点的角度：&lt;/p&gt;
&lt;div&gt;$$
\theta=\arctan \frac{v}{u}
$$&lt;/div&gt;
&lt;p&gt;可以用运算节点的反正切 2 计算这个$\theta$，但是结果的范围是$-\pi \sim+\pi$，需要映射回$0 \sim1$：&lt;/p&gt;</description>
    </item>
    <item>
      <title>Interlude 1. ToonIntergratedBxDF</title>
      <link>https://congyuxiaoyoudao.github.io/posts/interludes/toon-intergrated-bxdf/</link>
      <pubDate>Tue, 11 Mar 2025 00:00:00 +0000</pubDate>
      <guid>https://congyuxiaoyoudao.github.io/posts/interludes/toon-intergrated-bxdf/</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;之前的几篇文章中，我们已经完成了Toon模型一些基本的Feature。在深入定制之前，我们必须冷静下来思考一下我们需要什么&lt;/p&gt;
&lt;/blockquote&gt;
&lt;hr&gt;
&lt;h2 id=&#34;-0x00-to-begin-with&#34;&gt;🚩 0x00 To begin with&lt;/h2&gt;
&lt;p&gt;这篇文章将会包含以下内容：&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;input checked=&#34;&#34; disabled=&#34;&#34; type=&#34;checkbox&#34;&gt; 集成卡渲着色模型&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;For reference&lt;/strong&gt;👇：&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;📖







  
  &lt;a href=&#34;https://zhuanlan.zhihu.com/p/690066418&#34;&gt;【UE5】通过深度偏移计算刘海投影&lt;/a&gt;

&lt;/li&gt;
&lt;/ul&gt;
&lt;hr&gt;
&lt;h2 id=&#34;-0x02--toonintergratebxdf&#34;&gt;👀 0x02  ToonIntergrateBxDF&lt;/h2&gt;
&lt;p&gt;目前我们的光照模型只是已经具备了基本的明暗处理，仍然有数量众多的Feature需要去实现（Ramp、SDF、Anisotropic hair、Matcap、眼透等等）。虽然有一小部分可以用一些trick附加在基础色或其它材质槽上，但其余的就无可奈何了。而且不同于Unlit，在底层逻辑写死的情况下，能在材质编辑器中做的工作就比较有限了。&lt;/p&gt;
&lt;p&gt;一个比较容易想到的方法就是为需要特殊处理的材质单独新建一个着色模型，比如说头发一个、皮肤一个，然后里面各自处理需要的Feature。但着色模型数量是有限的，在不扩展&lt;code&gt;FMaterialShadingModelField&lt;/code&gt;至&lt;code&gt;uint32&lt;/code&gt;的情况下最多只允许16个着色模型。&lt;/p&gt;
&lt;p&gt;&lt;img alt=&#34;ShadingModelField只有16位&#34; loading=&#34;lazy&#34; src=&#34;https://raw.gitmirror.com/congyuxiaoyoudao/Picgo-ImageBed/main/TA-interludes/Interlude%201.ToonIntegrateBxDF/202503111821380.png#center&#34;&gt;&lt;/p&gt;
&lt;p&gt;而且这么多模型逐一添加也比较繁琐，我认为不太优雅，所以想到另一个方法。既然我们已经有一个&lt;code&gt;ToonBxDF&lt;/code&gt;，何不仿照&lt;code&gt;IntegrateBxDF&lt;/code&gt;的写法，在里面写个大分支，分发不同Toon材质的情况呢？&lt;/p&gt;
&lt;p&gt;&lt;img loading=&#34;lazy&#34; src=&#34;https://raw.gitmirror.com/congyuxiaoyoudao/Picgo-ImageBed/main/TA-interludes/Interlude%201.ToonIntegrateBxDF/202503111821796.png#center&#34;&gt;&lt;/p&gt;
&lt;p&gt;思路有了，那下一个问题就是，根据什么分发呢？&lt;code&gt;IntegrateBxDF&lt;/code&gt;是根据&lt;code&gt;ShadingModelID&lt;/code&gt;，我们应该也需要一个&lt;code&gt;ToonShadingModelID&lt;/code&gt;。这个时候我想起了之前开辟但没使用过的ToonCustom引脚。现在它被存储在GBuffer的&lt;code&gt;CustomData&lt;/code&gt;的Alpha通道中，我们可以停止放置Play，好好使用它了。&lt;/p&gt;
&lt;p&gt;&lt;img alt=&#34;CustomData的存储&#34; loading=&#34;lazy&#34; src=&#34;https://raw.gitmirror.com/congyuxiaoyoudao/Picgo-ImageBed/main/TA-interludes/Interlude%201.ToonIntegrateBxDF/202503111821429.png#center&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;FGBufferData&lt;/code&gt;中的&lt;code&gt;CustomData&lt;/code&gt;在BasePass中经过编码来到GBufferD，最后输出到MRT[4]或MRT[5]。&lt;/p&gt;
&lt;p&gt;&lt;img loading=&#34;lazy&#34; src=&#34;https://raw.gitmirror.com/congyuxiaoyoudao/Picgo-ImageBed/main/TA-interludes/Interlude%201.ToonIntegrateBxDF/202503111928061.png#center&#34;&gt;&lt;/p&gt;
&lt;p&gt;类型是&lt;code&gt;float&lt;/code&gt;，（没错，&lt;code&gt;half4&lt;/code&gt;竟然是个宏）。&lt;/p&gt;
&lt;p&gt;&lt;img loading=&#34;lazy&#34; src=&#34;https://raw.gitmirror.com/congyuxiaoyoudao/Picgo-ImageBed/main/TA-interludes/Interlude%201.ToonIntegrateBxDF/202503111822563.png#center&#34;&gt;&lt;/p&gt;
&lt;p&gt;但是范围只有0~1，由于GBufferTexture的性质，我们在这个引脚输入的任何数值都会被硬件钳制到这个范围。没办法，写个函数转一下吧。&lt;/p&gt;
&lt;p&gt;&lt;img alt=&#34;将浮点转为ToonShadingModelID&#34; loading=&#34;lazy&#34; src=&#34;https://raw.gitmirror.com/congyuxiaoyoudao/Picgo-ImageBed/main/TA-interludes/Interlude%201.ToonIntegrateBxDF/202503112000369.png#center&#34;&gt;&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-hlsl&#34; data-lang=&#34;hlsl&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt;1&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;kt&#34;&gt;uint&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;DecodeFloatToToonShadingModelID&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;kt&#34;&gt;float&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;SrcFloat&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt;2&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt;3&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;k&#34;&gt;return&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;SrcFloat&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;*&lt;/span&gt; &lt;span class=&#34;mi&#34;&gt;255&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;  
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt;4&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;UE里面也新写一个材质函数，把正常的ID映射过去，&lt;/p&gt;
&lt;p&gt;&lt;img alt=&#34;MF_EncodeToonShadingModelIDToFloat&#34; loading=&#34;lazy&#34; src=&#34;https://raw.gitmirror.com/congyuxiaoyoudao/Picgo-ImageBed/main/TA-interludes/Interlude%201.ToonIntegrateBxDF/202503112007292.png#center&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img alt=&#34;编码后接入自定义引脚&#34; loading=&#34;lazy&#34; src=&#34;https://raw.gitmirror.com/congyuxiaoyoudao/Picgo-ImageBed/main/TA-interludes/Interlude%201.ToonIntegrateBxDF/202503112010055.png#center&#34;&gt;&lt;/p&gt;
&lt;p&gt;最后在ToonIntergrateBxDF里随便写点东西测试一下，只有当&lt;code&gt;ToonShadingModelID&lt;/code&gt;为0时才有光照计算。&lt;/p&gt;
&lt;p&gt;&lt;img loading=&#34;lazy&#34; src=&#34;https://raw.gitmirror.com/congyuxiaoyoudao/Picgo-ImageBed/main/TA-interludes/Interlude%201.ToonIntegrateBxDF/202503112012801.png#center&#34;&gt;&lt;/p&gt;
&lt;p&gt;单独把身体的ID设成2看看效果。&lt;/p&gt;
&lt;p&gt;&lt;img loading=&#34;lazy&#34; src=&#34;https://raw.gitmirror.com/congyuxiaoyoudao/Picgo-ImageBed/main/TA-interludes/Interlude%201.ToonIntegrateBxDF/202503112017053.png#center&#34;&gt;&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
