1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-08 12:40:44 +00:00

Optimize Mobile renderer by using FP16 explicitly.

This commit is contained in:
Dario
2025-05-28 11:58:07 -03:00
parent 8f87e60307
commit 46277836a6
23 changed files with 938 additions and 786 deletions

View File

@@ -541,7 +541,7 @@ void main() {
float attenuation = get_omni_attenuation(d, spot_lights.data[light_index].inv_radius, spot_lights.data[light_index].attenuation);
vec3 spot_dir = spot_lights.data[light_index].direction;
highp float cone_angle = spot_lights.data[light_index].cone_angle;
float cone_angle = spot_lights.data[light_index].cone_angle;
float scos = max(dot(-normalize(light_rel_vec), spot_dir), cone_angle);
float spot_rim = max(0.0001, (1.0 - scos) / (1.0 - cone_angle));
attenuation *= 1.0 - pow(spot_rim, spot_lights.data[light_index].cone_attenuation);