语言英语
  • C#

InputExtraction.PopulateWorld

参数

bakeInput 要使用的烘焙输入。
progress 进度跟踪器。
context 设备上下文。
world 用于填充烘焙输入内容的世界。

返回

bool 如果成功填充世界,则返回 True。

说明

使用烘焙输入填充给定世界。

此方法生成由积分器使用的世界空间数据结构。例如,加速结构、查找表,以及可以由积分器共享的其他数据结构。相关内容:IWorld

How to populate a world from a bake input.

// 提取烘焙输入。 bool result = UnityEngine.LightTransport.InputExtraction.ExtractFromScene(out var input); Assert.IsTrue(result);

// 创建上下文和世界。 var context = new RadeonRaysContext(); Assert.NotNull(context);

var contextInitialized = context.Initialize(); Assert.AreEqual(true, contextInitialized); var world = new RadeonRaysWorld();

// 填充集成世界。 using var progress = new BakeProgressState(); var worldResult = UnityEngine.LightTransport.InputExtraction.PopulateWorld(input, progress, context, world); Assert.IsTrue(worldResult);

Context.Dispose();


Did you find this page useful? Please give it a rating: