Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The diagram below shows the creation of one IBakeInputSystem. Repeat for each output map required.

Excerpt
hiddentrue




Direct light baking

  1. First, all the bake systems have to be combined into a BakeSystemResource object. This object is used to create a KD tree for the other stages to trace against, so requires updating if any geometry changes.
  2. Next, copy lighting information into an IBakeInputLighting object.
  3. Now, for each BakeSystemResource, create an IBakeVisibilityBuffer with the IBake API. This operation is slow; therefore if only the lights have changed (and not the geometry) you can pass in an IBakeVisibilityBuffer from a previous run and it will be updated.
  4. Call IBake::BakeSystemDirect() to create the IBakeOutputSystemDirect. Optionally pass in a BakeSystemResource object to be able to apply a visibility-aware post-processing filter, with its size set as the filter size baking property. The final output texture, in FP16 format, can be pulled from this object.

...