| | 1 | | using System; |
| | 2 | | using System.Collections; |
| | 3 | | using System.Collections.Generic; |
| | 4 | | using UnityEngine; |
| | 5 | | using DCL.Helpers; |
| | 6 | |
|
| | 7 | | namespace DCL.Skybox |
| | 8 | | { |
| | 9 | | [CreateAssetMenu(fileName = "Skybox Configuration", menuName = "ScriptableObjects/SkyboxConfiguration", order = 1)] |
| | 10 | | public class SkyboxConfiguration : ScriptableObject |
| | 11 | | { |
| | 12 | | public delegate void TimelineEvents(string tag, bool enable, bool trigger); |
| | 13 | | public event TimelineEvents OnTimelineEvent; |
| | 14 | |
|
| | 15 | | // ID |
| | 16 | | public string skyboxID; |
| | 17 | |
|
| | 18 | | // Background Color |
| 0 | 19 | | public Gradient skyColor = new Gradient(); |
| 0 | 20 | | public Gradient horizonColor = new Gradient(); |
| 0 | 21 | | public Gradient groundColor = new Gradient(); |
| 0 | 22 | | public List<TransitioningFloat> horizonWidth = new List<TransitioningFloat>(); |
| 0 | 23 | | public List<TransitioningFloat> horizonHeight = new List<TransitioningFloat>(); |
| | 24 | |
|
| | 25 | | // Horizon Layer |
| | 26 | | public Texture2D horizonMask; |
| 0 | 27 | | public Vector2 horizonMaskTiling = new Vector2(0, 0); |
| 0 | 28 | | public Vector2 horizonMaskOffset = new Vector2(0, 0); |
| | 29 | |
|
| | 30 | | // Horizon Plane Layer |
| | 31 | | public Texture2D horizonPlaneTexture; |
| 0 | 32 | | public Vector2 horizonPlaneTiling = new Vector2(0, 0); |
| 0 | 33 | | public Vector2 horizonPlaneOffset = new Vector2(0, 0); |
| 0 | 34 | | public Gradient horizonPlaneColor = new Gradient(); |
| 0 | 35 | | public List<TransitioningFloat> horizonPlaneHeight = new List<TransitioningFloat>(); |
| 0 | 36 | | public Vector2 horizonPlaneSmoothRange = new Vector2(0, 0); |
| | 37 | | public float horizonLightIntensity = 0; |
| | 38 | |
|
| | 39 | | // Ambient Color |
| 0 | 40 | | public bool ambientTrilight = true; |
| 0 | 41 | | public Gradient ambientSkyColor = new Gradient(); |
| 0 | 42 | | public Gradient ambientEquatorColor = new Gradient(); |
| 0 | 43 | | public Gradient ambientGroundColor = new Gradient(); |
| | 44 | |
|
| | 45 | | // Avatar Color |
| 0 | 46 | | public bool useAvatarGradient = true; |
| 0 | 47 | | public Gradient avatarTintGradient = new Gradient(); |
| 0 | 48 | | public Color avatarTintColor = Color.white; |
| 0 | 49 | | public bool useAvatarRealtimeDLDirection = true; |
| 0 | 50 | | public Vector3 avatarLightConstantDir = new Vector3(-18f, 144f, -72f); |
| 0 | 51 | | public bool useAvatarRealtimeLightColor = true; |
| 0 | 52 | | public Gradient avatarLightColorGradient = new Gradient(); |
| | 53 | |
|
| | 54 | | // Avatar Editor Color |
| 0 | 55 | | public Color avatarEditorTintColor = Color.white; |
| 0 | 56 | | public Vector3 avatarEditorLightDir = new Vector3(-18f, 144f, -72f); |
| 0 | 57 | | public Color avatarEditorLightColor = Color.white; |
| | 58 | |
|
| | 59 | | // Fog Properties |
| | 60 | | public bool useFog = false; |
| 0 | 61 | | public FogMode fogMode = FogMode.ExponentialSquared; |
| 0 | 62 | | public Gradient fogColor = new Gradient(); |
| 0 | 63 | | public float fogDensity = 0.05f; |
| | 64 | | public float fogStartDistance = 0; |
| 0 | 65 | | public float fogEndDistance = 300; |
| | 66 | |
|
| | 67 | | // DirectionalLight Properties |
| 0 | 68 | | public bool useDirectionalLight = true; |
| 0 | 69 | | public DirectionalLightAttributes directionalLightLayer = new DirectionalLightAttributes(); |
| | 70 | |
|
| | 71 | | // Layers |
| 0 | 72 | | public List<TextureLayer> layers = new List<TextureLayer>(); |
| | 73 | |
|
| | 74 | | // Timeline Tags |
| 0 | 75 | | public List<TimelineTagsDuration> timelineTags = new List<TimelineTagsDuration>(); |
| | 76 | |
|
| | 77 | | // 3D Components |
| 0 | 78 | | public List<Config3DDome> additional3Dconfig = new List<Config3DDome>(); |
| 0 | 79 | | public List<Config3DSatellite> satelliteLayers = new List<Config3DSatellite>(); |
| 0 | 80 | | public List<Config3DPlanar> planarLayers = new List<Config3DPlanar>(); |
| | 81 | |
|
| 0 | 82 | | private float cycleTime = 24; |
| | 83 | |
|
| | 84 | | public void ApplyOnMaterial(Material selectedMat, float dayTime, float normalizedDayTime, int slotCount = 5, Lig |
| | 85 | | { |
| 0 | 86 | | float percentage = normalizedDayTime * 100; |
| | 87 | |
|
| | 88 | | // General Values |
| 0 | 89 | | selectedMat.SetColor(SkyboxShaderUtils.LightTint, directionalLightLayer.tintColor.Evaluate(normalizedDayTime |
| 0 | 90 | | selectedMat.SetVector(SkyboxShaderUtils.LightDirection, directionalLightGO.transform.rotation.eulerAngles); |
| | 91 | |
|
| | 92 | | // Apply Base Values |
| 0 | 93 | | selectedMat.SetColor(SkyboxShaderUtils.SkyColor, skyColor.Evaluate(normalizedDayTime)); |
| 0 | 94 | | selectedMat.SetColor(SkyboxShaderUtils.GroundColor, groundColor.Evaluate(normalizedDayTime)); |
| | 95 | |
|
| | 96 | | // Apply Horizon Values |
| 0 | 97 | | selectedMat.SetColor(SkyboxShaderUtils.HorizonColor, horizonColor.Evaluate(normalizedDayTime)); |
| 0 | 98 | | selectedMat.SetFloat(SkyboxShaderUtils.HorizonHeight, TransitioningValues.GetTransitionValue(horizonHeight, |
| 0 | 99 | | selectedMat.SetFloat(SkyboxShaderUtils.HorizonWidth, TransitioningValues.GetTransitionValue(horizonWidth, pe |
| 0 | 100 | | selectedMat.SetTexture(SkyboxShaderUtils.HorizonMask, horizonMask); |
| 0 | 101 | | selectedMat.SetVector(SkyboxShaderUtils.HorizonMaskValues, new Vector4(horizonMaskTiling.x, horizonMaskTilin |
| 0 | 102 | | selectedMat.SetTexture(SkyboxShaderUtils.HorizonPlane, horizonPlaneTexture); |
| 0 | 103 | | selectedMat.SetVector(SkyboxShaderUtils.HorizonPlaneValues, new Vector4(horizonPlaneTiling.x, horizonPlaneTi |
| 0 | 104 | | selectedMat.SetColor(SkyboxShaderUtils.HorizonPlaneColor, horizonPlaneColor.Evaluate(normalizedDayTime)); |
| 0 | 105 | | selectedMat.SetFloat(SkyboxShaderUtils.HorizonPlaneHeight, TransitioningValues.GetTransitionValue(horizonPla |
| 0 | 106 | | selectedMat.SetVector(SkyboxShaderUtils.PlaneSmoothRange, horizonPlaneSmoothRange); |
| 0 | 107 | | selectedMat.SetFloat(SkyboxShaderUtils.HorizonLightIntensity, horizonLightIntensity); |
| | 108 | |
|
| | 109 | |
|
| | 110 | | // Apply Ambient colors to the rendering settings |
| 0 | 111 | | if (ambientTrilight) |
| | 112 | | { |
| 0 | 113 | | RenderSettings.ambientMode = UnityEngine.Rendering.AmbientMode.Trilight; |
| 0 | 114 | | RenderSettings.ambientSkyColor = ambientSkyColor.Evaluate(normalizedDayTime); |
| 0 | 115 | | RenderSettings.ambientEquatorColor = ambientEquatorColor.Evaluate(normalizedDayTime); |
| 0 | 116 | | RenderSettings.ambientGroundColor = ambientGroundColor.Evaluate(normalizedDayTime); |
| 0 | 117 | | } |
| | 118 | | else |
| | 119 | | { |
| 0 | 120 | | RenderSettings.ambientMode = UnityEngine.Rendering.AmbientMode.Skybox; |
| | 121 | | } |
| | 122 | |
|
| | 123 | | //Fog Values |
| 0 | 124 | | RenderSettings.fog = useFog; |
| 0 | 125 | | if (useFog) |
| | 126 | | { |
| 0 | 127 | | RenderSettings.fogColor = fogColor.Evaluate(normalizedDayTime); |
| 0 | 128 | | RenderSettings.fogMode = fogMode; |
| 0 | 129 | | switch (fogMode) |
| | 130 | | { |
| | 131 | | case FogMode.Linear: |
| 0 | 132 | | RenderSettings.fogStartDistance = fogStartDistance; |
| 0 | 133 | | RenderSettings.fogEndDistance = fogEndDistance; |
| 0 | 134 | | break; |
| | 135 | | default: |
| 0 | 136 | | RenderSettings.fogDensity = fogDensity; |
| | 137 | | break; |
| | 138 | | } |
| | 139 | | } |
| | 140 | |
|
| | 141 | | //Directional List |
| 0 | 142 | | if (useDirectionalLight) |
| | 143 | | { |
| | 144 | | // Apply Direction light color |
| 0 | 145 | | directionalLightGO.color = directionalLightLayer.lightColor.Evaluate(normalizedDayTime); |
| | 146 | |
|
| | 147 | | // Apply direction |
| 0 | 148 | | ApplyDLDirection(normalizedDayTime, directionalLightGO); |
| | 149 | |
|
| | 150 | | // Apply Intensity |
| 0 | 151 | | ApplyDLIntensity(normalizedDayTime, directionalLightGO); |
| 0 | 152 | | } |
| | 153 | | else |
| | 154 | | { |
| 0 | 155 | | directionalLightGO.gameObject.SetActive(false); |
| | 156 | | } |
| | 157 | |
|
| | 158 | | // Check and Fire timeline events |
| 0 | 159 | | CheckAndFireTimelineEvents(dayTime); |
| | 160 | |
|
| 0 | 161 | | ApplyAllSlots(selectedMat, layers, dayTime, normalizedDayTime, slotCount, cycleTime); |
| 0 | 162 | | } |
| | 163 | |
|
| | 164 | | public void ApplyInWorldAvatarColor(float normalizedDayTime, GameObject directionalLightGO) |
| | 165 | | { |
| 0 | 166 | | if (useAvatarGradient) |
| | 167 | | { |
| 0 | 168 | | Shader.SetGlobalColor(ShaderUtils.TintColor, avatarTintGradient.Evaluate(normalizedDayTime)); |
| 0 | 169 | | } |
| | 170 | | else |
| | 171 | | { |
| 0 | 172 | | Shader.SetGlobalColor(ShaderUtils.TintColor, avatarTintColor); |
| | 173 | | } |
| | 174 | |
|
| | 175 | | // Apply Avatar Light Direction |
| 0 | 176 | | if (!useAvatarRealtimeDLDirection || directionalLightGO == null || !useDirectionalLight) |
| | 177 | | { |
| 0 | 178 | | Shader.SetGlobalVector(ShaderUtils.LightDir, avatarLightConstantDir / 180); |
| 0 | 179 | | } |
| | 180 | | else |
| | 181 | | { |
| 0 | 182 | | Vector3 tempDir = directionalLightGO.transform.rotation.eulerAngles; |
| 0 | 183 | | Shader.SetGlobalVector(ShaderUtils.LightDir, tempDir / 180); |
| | 184 | | } |
| | 185 | |
|
| | 186 | | // Apply Avatar Light Color |
| 0 | 187 | | if (!useAvatarRealtimeLightColor || directionalLightGO == null || !useDirectionalLight) |
| | 188 | | { |
| 0 | 189 | | Shader.SetGlobalColor(ShaderUtils.LightColor, avatarLightColorGradient.Evaluate(normalizedDayTime)); |
| 0 | 190 | | } |
| | 191 | | else |
| | 192 | | { |
| 0 | 193 | | Shader.SetGlobalColor(ShaderUtils.LightColor, directionalLightLayer.lightColor.Evaluate(normalizedDayTim |
| | 194 | | } |
| 0 | 195 | | } |
| | 196 | |
|
| | 197 | | public void ApplyEditorAvatarColor() |
| | 198 | | { |
| 0 | 199 | | Shader.SetGlobalColor(ShaderUtils.TintColor, avatarEditorTintColor); |
| 0 | 200 | | Shader.SetGlobalVector(ShaderUtils.LightDir, avatarEditorLightDir / 180); |
| 0 | 201 | | Shader.SetGlobalColor(ShaderUtils.LightColor, avatarEditorLightColor); |
| 0 | 202 | | } |
| | 203 | |
|
| | 204 | | void ApplyAllSlots(Material selectedMat, List<TextureLayer> layers, float dayTime, float normalizedDayTime, int |
| | 205 | | { |
| 0 | 206 | | for (int i = 0; i < slotCount; i++) |
| | 207 | | { |
| 0 | 208 | | TextureLayer layer = GetActiveLayer(layers, dayTime, i); |
| | 209 | |
|
| 0 | 210 | | if (layer == null || !layer.enabled) |
| | 211 | | { |
| 0 | 212 | | ResetSlot(selectedMat, i); |
| 0 | 213 | | continue; |
| | 214 | | } |
| | 215 | |
|
| 0 | 216 | | TextureLayerFunctionality.ApplyTextureLayer(selectedMat, dayTime, normalizedDayTime, i, layer, cycleTime |
| | 217 | | } |
| 0 | 218 | | } |
| | 219 | |
|
| | 220 | | public TextureLayer GetActiveLayer(List<TextureLayer> layers, float currentTime, int slotID) |
| | 221 | | { |
| 0 | 222 | | TextureLayer temp = null; |
| | 223 | |
|
| 0 | 224 | | for (int i = 0; i < layers.Count; i++) |
| | 225 | | { |
| 0 | 226 | | if (layers[i].slotID != slotID) |
| | 227 | | { |
| | 228 | | continue; |
| | 229 | | } |
| | 230 | |
|
| 0 | 231 | | float endTimeEdited = layers[i].timeSpan_End; |
| 0 | 232 | | float dayTimeEdited = currentTime; |
| | 233 | |
|
| 0 | 234 | | if (layers[i].timeSpan_End < layers[i].timeSpan_start) |
| | 235 | | { |
| 0 | 236 | | endTimeEdited = cycleTime + layers[i].timeSpan_End; |
| 0 | 237 | | if (currentTime < layers[i].timeSpan_start) |
| | 238 | | { |
| 0 | 239 | | dayTimeEdited = cycleTime + currentTime; |
| | 240 | | } |
| | 241 | | } |
| | 242 | |
|
| 0 | 243 | | if (dayTimeEdited >= layers[i].timeSpan_start && dayTimeEdited <= endTimeEdited) |
| | 244 | | { |
| 0 | 245 | | if (layers[i].enabled) |
| | 246 | | { |
| 0 | 247 | | if (temp == null) |
| | 248 | | { |
| 0 | 249 | | layers[i].renderType = LayerRenderType.Rendering; |
| 0 | 250 | | temp = layers[i]; |
| 0 | 251 | | } |
| | 252 | | else |
| | 253 | | { |
| 0 | 254 | | temp.renderType = LayerRenderType.Conflict_Playing; |
| 0 | 255 | | layers[i].renderType = LayerRenderType.Conflict_NotPlaying; |
| | 256 | | } |
| 0 | 257 | | } |
| | 258 | | else |
| | 259 | | { |
| 0 | 260 | | layers[i].renderType = LayerRenderType.NotRendering; |
| | 261 | | } |
| 0 | 262 | | } |
| | 263 | | else |
| | 264 | | { |
| 0 | 265 | | layers[i].renderType = LayerRenderType.NotRendering; |
| | 266 | | } |
| | 267 | |
|
| | 268 | |
|
| | 269 | | } |
| 0 | 270 | | return temp; |
| | 271 | | } |
| | 272 | |
|
| | 273 | | #region Timeline Events |
| | 274 | |
|
| | 275 | | /// <summary> |
| | 276 | | /// Check if any event has to be fired |
| | 277 | | /// TODO:: Can be optimised. |
| | 278 | | /// </summary> |
| | 279 | | /// <param name="dayTime">Current day time</param> |
| | 280 | | private void CheckAndFireTimelineEvents(float dayTime) |
| | 281 | | { |
| 0 | 282 | | float endTimeEdited = 0; |
| 0 | 283 | | float dayTimeEdited = dayTime; |
| 0 | 284 | | for (int i = 0; i < timelineTags.Count; i++) |
| | 285 | | { |
| | 286 | | // If current event is a trigger event, fire trigger event. It's boolean will be disable when cycle rese |
| 0 | 287 | | if (timelineTags[i].isTrigger) |
| | 288 | | { |
| 0 | 289 | | if (dayTime > timelineTags[i].startTime && !timelineTags[i].startEventExecuted) |
| | 290 | | { |
| 0 | 291 | | OnTimelineEvent?.Invoke(timelineTags[i].tag, true, true); |
| 0 | 292 | | timelineTags[i].startEventExecuted = true; |
| | 293 | | } |
| 0 | 294 | | continue; |
| | 295 | | } |
| | 296 | |
|
| | 297 | |
|
| 0 | 298 | | endTimeEdited = timelineTags[i].endTime; |
| 0 | 299 | | dayTimeEdited = dayTime; |
| | 300 | |
|
| | 301 | | // Change time if this is over a day scenario |
| 0 | 302 | | if (timelineTags[i].endTime < timelineTags[i].startTime) |
| | 303 | | { |
| 0 | 304 | | endTimeEdited = cycleTime + timelineTags[i].endTime; |
| | 305 | |
|
| 0 | 306 | | if (dayTime < timelineTags[i].startTime) |
| | 307 | | { |
| 0 | 308 | | dayTimeEdited = cycleTime + dayTime; |
| | 309 | | } |
| | 310 | | } |
| | 311 | |
|
| | 312 | | // If current time is between start and end time and start event is not executed, Fire start event |
| 0 | 313 | | if (dayTimeEdited >= timelineTags[i].startTime && dayTimeEdited < endTimeEdited && !timelineTags[i].star |
| | 314 | | { |
| 0 | 315 | | OnTimelineEvent?.Invoke(timelineTags[i].tag, true, false); |
| 0 | 316 | | timelineTags[i].startEventExecuted = true; |
| | 317 | | } |
| | 318 | |
|
| | 319 | | // If current time is greater than end time and start event is executed, fire end event |
| 0 | 320 | | if (dayTimeEdited >= endTimeEdited && timelineTags[i].startEventExecuted) |
| | 321 | | { |
| 0 | 322 | | OnTimelineEvent?.Invoke(timelineTags[i].tag, false, false); |
| 0 | 323 | | timelineTags[i].startEventExecuted = false; |
| | 324 | | } |
| | 325 | |
|
| | 326 | | } |
| 0 | 327 | | } |
| | 328 | |
|
| | 329 | | public void CycleResets() |
| | 330 | | { |
| | 331 | | // Resets all timeline triggers and normal flow events |
| 0 | 332 | | for (int i = 0; i < timelineTags.Count; i++) |
| | 333 | | { |
| 0 | 334 | | if (timelineTags[i].isTrigger) |
| | 335 | | { |
| 0 | 336 | | timelineTags[i].startEventExecuted = false; |
| 0 | 337 | | continue; |
| | 338 | | } |
| | 339 | |
|
| 0 | 340 | | if (timelineTags[i].endTime > timelineTags[i].startTime) |
| | 341 | | { |
| 0 | 342 | | timelineTags[i].startEventExecuted = false; |
| | 343 | | } |
| | 344 | | } |
| 0 | 345 | | } |
| | 346 | |
|
| | 347 | | #endregion |
| | 348 | |
|
| | 349 | | #region Directional Light |
| | 350 | |
|
| | 351 | | void ApplyDLIntensity(float normalizedDayTime, Light lightGO) |
| | 352 | | { |
| 0 | 353 | | if (lightGO == null) |
| | 354 | | { |
| 0 | 355 | | Debug.LogError("Directional Light option is on, with light reference"); |
| 0 | 356 | | return; |
| | 357 | | } |
| | 358 | |
|
| 0 | 359 | | if (directionalLightLayer.intensity.Count == 0) |
| | 360 | | { |
| 0 | 361 | | Debug.Log("Directional Light option is on with no intensity data"); |
| 0 | 362 | | return; |
| | 363 | | } |
| | 364 | |
|
| 0 | 365 | | if (directionalLightLayer.intensity.Count == 1) |
| | 366 | | { |
| 0 | 367 | | lightGO.intensity = directionalLightLayer.intensity[0].value; |
| 0 | 368 | | return; |
| | 369 | | } |
| | 370 | |
|
| | 371 | |
|
| 0 | 372 | | lightGO.intensity = TransitioningValues.GetTransitionValue(directionalLightLayer.intensity, normalizedDayTim |
| 0 | 373 | | } |
| | 374 | |
|
| | 375 | | void ApplyDLDirection(float normalizedDayTime, Light lightGO) |
| | 376 | | { |
| 0 | 377 | | if (lightGO == null) |
| | 378 | | { |
| 0 | 379 | | return; |
| | 380 | | } |
| | 381 | |
|
| 0 | 382 | | if (directionalLightLayer.lightDirection.Count == 0) |
| | 383 | | { |
| 0 | 384 | | return; |
| | 385 | | } |
| | 386 | |
|
| 0 | 387 | | if (directionalLightLayer.lightDirection.Count == 1) |
| | 388 | | { |
| 0 | 389 | | lightGO.transform.rotation = directionalLightLayer.lightDirection[0].value; |
| 0 | 390 | | return; |
| | 391 | | } |
| | 392 | |
|
| 0 | 393 | | float percentage = normalizedDayTime * 100; |
| 0 | 394 | | TransitioningQuaternion min = directionalLightLayer.lightDirection[0], max = directionalLightLayer.lightDire |
| | 395 | |
|
| | 396 | | // Apply Direction |
| 0 | 397 | | for (int i = 0; i < directionalLightLayer.lightDirection.Count; i++) |
| | 398 | | { |
| 0 | 399 | | if (percentage <= directionalLightLayer.lightDirection[i].percentage) |
| | 400 | | { |
| 0 | 401 | | max = directionalLightLayer.lightDirection[i]; |
| | 402 | |
|
| 0 | 403 | | if ((i - 1) > 0) |
| | 404 | | { |
| 0 | 405 | | min = directionalLightLayer.lightDirection[i - 1]; |
| | 406 | | } |
| | 407 | |
|
| 0 | 408 | | break; |
| | 409 | | } |
| | 410 | | } |
| | 411 | |
|
| 0 | 412 | | float t = Mathf.InverseLerp(min.percentage, max.percentage, percentage); |
| 0 | 413 | | lightGO.transform.rotation = Quaternion.Lerp(min.value, max.value, t); |
| 0 | 414 | | } |
| | 415 | |
|
| | 416 | | #endregion |
| | 417 | |
|
| | 418 | | public void ResetMaterial(Material selectedMat, int slotCount) |
| | 419 | | { |
| 0 | 420 | | for (int i = 0; i < slotCount; i++) |
| | 421 | | { |
| 0 | 422 | | ResetSlot(selectedMat, i); |
| | 423 | | } |
| 0 | 424 | | } |
| | 425 | |
|
| | 426 | | public void ResetSlot(Material selectedMat, int slotCount) |
| | 427 | | { |
| 0 | 428 | | selectedMat.SetFloat(SkyboxShaderUtils.GetLayerProperty("_layerType_" + slotCount), 0); |
| 0 | 429 | | selectedMat.SetTexture(SkyboxShaderUtils.GetLayerProperty("_tex_" + slotCount), null); |
| 0 | 430 | | selectedMat.SetTexture(SkyboxShaderUtils.GetLayerProperty("_cubemap_" + slotCount), null); |
| 0 | 431 | | selectedMat.SetTexture(SkyboxShaderUtils.GetLayerProperty("_normals_" + slotCount), null); |
| 0 | 432 | | selectedMat.SetColor(SkyboxShaderUtils.GetLayerProperty("_color_" + slotCount), new Color(1, 1, 1, 0)); |
| 0 | 433 | | selectedMat.SetVector(SkyboxShaderUtils.GetLayerProperty("_tilingAndOffset_" + slotCount), new Vector4(1, 1, |
| 0 | 434 | | selectedMat.SetVector(SkyboxShaderUtils.GetLayerProperty("_speedAndRotation_" + slotCount), new Vector4(0, 0 |
| 0 | 435 | | selectedMat.SetVector(SkyboxShaderUtils.GetLayerProperty("_timeFrame_" + slotCount), new Vector4(0, 0)); |
| 0 | 436 | | selectedMat.SetFloat(SkyboxShaderUtils.GetLayerProperty("_fadeTime_" + slotCount), 1); |
| 0 | 437 | | selectedMat.SetFloat(SkyboxShaderUtils.GetLayerProperty("_normalIntensity_" + slotCount), 0); |
| 0 | 438 | | selectedMat.SetFloat(SkyboxShaderUtils.GetLayerProperty("_lightIntensity_" + slotCount), 0); |
| 0 | 439 | | selectedMat.SetFloat(SkyboxShaderUtils.GetLayerProperty("_RenderDistance_" + slotCount), 3.4f); |
| 0 | 440 | | selectedMat.SetVector(SkyboxShaderUtils.GetLayerProperty("_distortIntAndSize_" + slotCount), new Vector2(0, |
| 0 | 441 | | selectedMat.SetVector(SkyboxShaderUtils.GetLayerProperty("_distortSpeedAndSharp_" + slotCount), new Vector4( |
| 0 | 442 | | selectedMat.SetVector(SkyboxShaderUtils.GetLayerProperty("_rowAndCollumns_" + slotCount), new Vector4(1, 1)) |
| 0 | 443 | | selectedMat.SetVector(SkyboxShaderUtils.GetLayerProperty("_particlesMainParameters_" + slotCount), new Vecto |
| 0 | 444 | | selectedMat.SetVector(SkyboxShaderUtils.GetLayerProperty("_particlesSecondaryParameters_" + slotCount), new |
| 0 | 445 | | } |
| | 446 | |
|
| | 447 | | } |
| | 448 | | } |