@@ -39,13 +39,13 @@ public void UpdateLight(Light light, LightData data, bool isInsert)
39
39
// color and position
40
40
hdLight . color = data . Color2 . ToUnityColor ( ) ;
41
41
if ( ! isInsert ) {
42
- hdLight . intensity = data . Intensity / 4f ;
42
+ light . intensity = data . Intensity / 4f ;
43
43
hdLight . range = data . Falloff * 0.001f ;
44
44
45
45
// TODO: vpe specific data for height
46
46
light . transform . localPosition = new Vector3 ( 0f , 0f , 25f ) ;
47
47
} else {
48
- hdLight . intensity = data . Intensity * 10f ;
48
+ light . intensity = data . Intensity * 10f ;
49
49
}
50
50
51
51
@@ -78,10 +78,8 @@ public void SetRange(Light light, float range)
78
78
79
79
public void SetIntensity ( Light light , float intensityLumen )
80
80
{
81
- var hdLight = light . GetComponent < HDAdditionalLightData > ( ) ;
82
- if ( hdLight != null ) {
83
- hdLight . SetIntensity ( intensityLumen , LightUnit . Lumen ) ;
84
- }
81
+ light . intensity = intensityLumen ;
82
+ light . lightUnit = UnityEngine . Rendering . LightUnit . Lumen ;
85
83
}
86
84
public void SetTemperature ( Light light , float temperature )
87
85
{
@@ -93,18 +91,16 @@ public void SetTemperature(Light light, float temperature)
93
91
94
92
public void SpotLight ( Light light , float outer , float innerPercent )
95
93
{
96
- var hdLight = light . GetComponent < HDAdditionalLightData > ( ) ;
97
- if ( hdLight != null ) {
98
- hdLight . type = HDLightType . Spot ;
99
- hdLight . SetSpotAngle ( outer , innerPercent ) ;
100
- }
94
+ light . type = LightType . Spot ;
95
+ light . spotAngle = outer ;
96
+ light . innerSpotAngle = innerPercent ;
101
97
}
102
98
103
99
public void PyramidAngle ( Light light , float angle , float aspectRatio )
104
100
{
105
101
var hdLight = light . GetComponent < HDAdditionalLightData > ( ) ;
106
102
if ( hdLight != null ) {
107
- hdLight . spotLightShape = SpotLightShape . Pyramid ;
103
+ // hdLight.spotLightShape = SpotLightShape.Pyramid;
108
104
hdLight . SetSpotAngle ( angle ) ;
109
105
hdLight . aspectRatio = aspectRatio ;
110
106
}
0 commit comments