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