|
|
|
|
|
|
#ifndef UNITY_LIGHT_UTILITIES_INCLUDED |
|
|
|
#define UNITY_LIGHT_UTILITIES_INCLUDED |
|
|
|
|
|
|
|
#include "LightDefinition.cs.hlsl" |
|
|
|
|
|
|
|
void InitSkyEnvLightData(int index) |
|
|
|
EnvLightData InitSkyEnvLightData(int envIndex) |
|
|
|
_EnvLightSky.envShapeType = ENVSHAPETYPE_SKY; |
|
|
|
_EnvLightSky.envIndex = index; |
|
|
|
_EnvLightSky.forward = float3(0.0, 0.0, 1.0); |
|
|
|
_EnvLightSky.up = float3(0.0, 1.0, 0.0); |
|
|
|
_EnvLightSky.right = float3(1.0, 0.0, 0.0); |
|
|
|
_EnvLightSky.positionWS = float3(0.0, 0.0, 0.0); |
|
|
|
_EnvLightSky.offsetLS = float3(0.0, 0.0, 0.0); |
|
|
|
_EnvLightSky.innerDistance = float3(0.0, 0.0, 0.0); |
|
|
|
_EnvLightSky.blendDistance = 1.0; |
|
|
|
EnvLightData output; |
|
|
|
output.envShapeType = ENVSHAPETYPE_SKY; |
|
|
|
output.envIndex = envIndex; |
|
|
|
output.forward = float3(0.0, 0.0, 1.0); |
|
|
|
output.up = float3(0.0, 1.0, 0.0); |
|
|
|
output.right = float3(1.0, 0.0, 0.0); |
|
|
|
output.positionWS = float3(0.0, 0.0, 0.0); |
|
|
|
output.offsetLS = float3(0.0, 0.0, 0.0); |
|
|
|
output.innerDistance = float3(0.0, 0.0, 0.0); |
|
|
|
output.blendDistance = 1.0; |
|
|
|
|
|
|
|
return output; |
|
|
|
#endif // UNITY_LIGHT_UTILITIES_INCLUDED |
|
|
|
#endif // UNITY_LIGHT_UTILITIES_INCLUDED |