您最多选择25个主题
主题必须以中文或者字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
32 行
1021 B
32 行
1021 B
#ifndef UNITY_LIGHT_UTILITIES_INCLUDED
|
|
#define UNITY_LIGHT_UTILITIES_INCLUDED
|
|
|
|
#include "LightDefinition.cs.hlsl"
|
|
|
|
// The EnvLightData of the sky light contains a bunch of compile-time constants.
|
|
// This function sets them directly to allow the compiler to propagate them and optimize the code.
|
|
EnvLightData InitSkyEnvLightData(int envIndex)
|
|
{
|
|
EnvLightData output;
|
|
ZERO_INITIALIZE(EnvLightData, output);
|
|
output.influenceShapeType = ENVSHAPETYPE_SKY;
|
|
output.envIndex = envIndex;
|
|
|
|
output.influenceForward = float3(0.0, 0.0, 1.0);
|
|
output.influenceUp = float3(0.0, 1.0, 0.0);
|
|
output.influenceRight = float3(1.0, 0.0, 0.0);
|
|
output.influencePositionWS = float3(0.0, 0.0, 0.0);
|
|
|
|
output.weight = 1.0;
|
|
output.multiplier = 1.0;
|
|
|
|
// proxy
|
|
output.proxyForward = float3(0.0, 0.0, 1.0);
|
|
output.proxyUp = float3(0.0, 1.0, 0.0);
|
|
output.proxyRight = float3(1.0, 0.0, 0.0);
|
|
output.minProjectionDistance = 65504.0f;
|
|
|
|
return output;
|
|
}
|
|
|
|
#endif // UNITY_LIGHT_UTILITIES_INCLUDED
|