Added dawn

This commit is contained in:
Vladislav Khorev committed 2026-06-04 18:01:51 +03:00
1 parent 83b92e9881
commit c8d743b932
13 files changed
+88 -40

No files matched your search

+4 -3
View File
@@ -4,6 +4,8 @@ uniform int uPointLightCount;
uniform vec3 uPointLightPos[4];
uniform vec3 uPointLightDir[4];
uniform vec3 uPointLightColor[4];
uniform vec3 uAmbientColor;
uniform vec3 uFogColor;
varying vec2 texCoord;
varying float fogDistance;
@@ -21,8 +23,7 @@ void main()
if (color.a < 0.1)
discard;
float ambient = 0.37;
vec3 lighting = vec3(ambient);
vec3 lighting = uAmbientColor;
bool hasNormal = dot(fragNormal, fragNormal) > 0.001;
vec3 N = hasNormal ? normalize(fragNormal) : vec3(0.0);
@@ -48,7 +49,7 @@ void main()
color.rgb *= lighting;
vec3 fogColor = vec3(0.01, 0.01, 0.05);
vec3 fogColor = uFogColor;
float fogFactor = clamp((fogDistance - 15.0) / 8.0, 0.0, 1.0);
color.rgb = mix(color.rgb, fogColor, fogFactor);
@@ -6,6 +6,8 @@ uniform int uPointLightCount;
uniform vec3 uPointLightPos[4];
uniform vec3 uPointLightDir[4];
uniform vec3 uPointLightColor[4];
uniform vec3 uAmbientColor;
uniform vec3 uFogColor;
varying vec2 texCoord;
varying vec4 fragPosLightSpace;
@@ -59,8 +61,7 @@ void main()
if (color.a < 0.1)
discard;
float ambient = 0.37;
vec3 lighting = vec3(ambient);
vec3 lighting = uAmbientColor;
bool hasNormal = dot(fragNormal, fragNormal) > 0.001;
vec3 N = hasNormal ? normalize(fragNormal) : vec3(0.0);
@@ -87,7 +88,7 @@ void main()
color.rgb *= lighting;
vec3 fogColor = vec3(0.01, 0.01, 0.05);
vec3 fogColor = uFogColor;
float fogFactor = clamp((fogDistance - 15.0) / 8.0, 0.0, 1.0);
color.rgb = mix(color.rgb, fogColor, fogFactor);
@@ -8,6 +8,8 @@ uniform int uPointLightCount;
uniform vec3 uPointLightPos[4];
uniform vec3 uPointLightDir[4];
uniform vec3 uPointLightColor[4];
uniform vec3 uAmbientColor;
uniform vec3 uFogColor;
varying vec2 texCoord;
varying vec4 fragPosLightSpace;
@@ -61,8 +63,7 @@ void main()
if (color.a < 0.1)
discard;
float ambient = 0.37;
vec3 lighting = vec3(ambient);
vec3 lighting = uAmbientColor;
bool hasNormal = dot(fragNormal, fragNormal) > 0.001;
vec3 N = hasNormal ? normalize(fragNormal) : vec3(0.0);
@@ -89,7 +90,7 @@ void main()
color.rgb *= lighting;
vec3 fogColor = vec3(0.01, 0.01, 0.05);
vec3 fogColor = uFogColor;
float fogFactor = clamp((fogDistance - 15.0) / 8.0, 0.0, 1.0);
color.rgb = mix(color.rgb, fogColor, fogFactor);
+4 -3
View File
@@ -6,6 +6,8 @@ uniform int uPointLightCount;
uniform vec3 uPointLightPos[4];
uniform vec3 uPointLightDir[4];
uniform vec3 uPointLightColor[4];
uniform vec3 uAmbientColor;
uniform vec3 uFogColor;
varying vec2 texCoord;
varying float fogDistance;
@@ -23,8 +25,7 @@ void main()
if (color.a < 0.1)
discard;
float ambient = 0.37;
vec3 lighting = vec3(ambient);
vec3 lighting = uAmbientColor;
bool hasNormal = dot(fragNormal, fragNormal) > 0.001;
vec3 N = hasNormal ? normalize(fragNormal) : vec3(0.0);
@@ -50,7 +51,7 @@ void main()
color.rgb *= lighting;
vec3 fogColor = vec3(0.01, 0.01, 0.05);
vec3 fogColor = uFogColor;
float fogFactor = clamp((fogDistance - 15.0) / 8.0, 0.0, 1.0);
color.rgb = mix(color.rgb, fogColor, fogFactor);
+1
View File
@@ -39,6 +39,7 @@ game_api.set_darklands_callbacks(
game_api.setIntValue("day", 1)
game_api.setIntValue("need_sleep", 1)
game_api.set_player_hp(10)
game_api.set_dawn()
end
)
+1
View File
@@ -590,6 +590,7 @@ game_api.set_darklands_callbacks(
player_left_darklands = true
morning_did_open_door_index = 0
setDay1MorningSetup()
game_api.set_dawn()
local px = game_api.get_player_x()