LanguageEnglish
  • C#

IProbePostProcessor.ConvertToUnityFormat

Declaration

public bool ConvertToUnityFormat(LightTransport.IDeviceContext context, BufferSlice<SphericalHarmonicsL2> irradianceIn, BufferSlice<SphericalHarmonicsL2> irradianceOut, int probeCount);

Parameters

context Device context.
irradianceIn Buffer containing input irradiance.
irradianceOut Output buffer containing the irradiance array after the conversion to the format compatible with a Unity renderer.
probeCount Number of SphericalHarmonicsL2 probes to convert.

Returns

bool True if the operation was successfully added to the command queue on the context.

Description

Converts light probes encoded as SphericalHarmonicsL2 to the format expected by the Unity renderer.

The irradiance SphericalHarmonicsL2 light probes must satisfy the following conditions when used with a Unity renderer: 1) For L0 and L1, the coefficients must have the SH standard normalization terms folded into them (to avoid doing this multiplication in a shader). 2) The coefficients must be divided by Pi (π) for compatibility reasons. 3) L1 must be ordered as yzx (rather than xyz). The order is flipped back right before rendering in the GetShaderConstantsFromNormalizedSH function, before the SphericalHarmonicsL2 probes are passed to a shader.


对文档有任何疑问,请移步至开发者社区提问,我们将尽快为您解答
Copyright © 2023 Unity Technologies
优美缔软件(上海)有限公司 版权所有
"Unity"、Unity 徽标及其他 Unity 商标是 Unity Technologies 或其附属机构在美国及其他地区的商标或注册商标。其他名称或品牌是其各自所有者的商标。
公安部备案号:
31010902002961