Fix compat mode floats in light attenuation + release notes (#6209)

* Fix compat mode float shit

* release notes
This commit is contained in:
Kara
2025-09-18 15:44:02 +00:00
committed by GitHub
parent 94e60e0b10
commit 27f2e270ce
2 changed files with 3 additions and 1 deletions

View File

@@ -43,6 +43,7 @@ END TEMPLATE-->
* `System.WeakReference<T>` is now available in the sandbox.
* `IClydeViewport` now has an `Id` and `ClearCachedResources` event. Together, these allow you to properly cache rendering resources per viewport.
* Added a new entity yaml deserialization option (`SerializationOptions.EntityExceptionBehaviour`) that can optionally make deserialization more exception tolerant.
* `PointLightComponent` now has two fields, `falloff` and `curveFactor`, for controlling light falloff and the shape of the light attenuation curve.
### Bugfixes
@@ -52,6 +53,7 @@ END TEMPLATE-->
### Other
* The client now logs an error when attempting to send a network message without server connection. Previously, it would be silently dropped.
* The function used for pointlight attenuation has been modified to be c1 continuous as opposed to simply c0 continuous, resulting in smoother boundary behavior.
### Internal

View File

@@ -57,7 +57,7 @@ void fragment()
highp float s2 = s * s;
// controls curve by lerping between two variants (inverse-shape and inversequadratic-shape)
highp float curveFactor = mix(s, s2, clamp(lightCurveFactor, 0.0, 1.0));
highp float val = clamp(((1 - s2) * (1 - s2)) / (1 + lightFalloff * curveFactor), 0.0, 1.0);
highp float val = clamp(((1.0 - s2) * (1.0 - s2)) / (1.0 + lightFalloff * curveFactor), 0.0, 1.0);
val *= lightPower;
val *= mask;