Merge branch 'MihailRis:main' into main

This commit is contained in:
Xertis
2025-01-15 18:20:10 +03:00
committed by GitHub
5 changed files with 17 additions and 15 deletions
+5 -11
View File
@@ -413,15 +413,9 @@ end
local __vc_coroutines = {}
local __vc_named_coroutines = {}
local __vc_next_coroutine = 1
local __vc_coroutine_error = nil
function __vc_start_coroutine(chunk)
local co = coroutine.create(function()
local status, err = pcall(chunk)
if not status then
__vc_coroutine_error = err
end
end)
local co = coroutine.create(chunk)
local id = __vc_next_coroutine
__vc_next_coroutine = __vc_next_coroutine + 1
__vc_coroutines[id] = co
@@ -431,10 +425,10 @@ end
function __vc_resume_coroutine(id)
local co = __vc_coroutines[id]
if co then
coroutine.resume(co)
if __vc_coroutine_error then
debug.error(__vc_coroutine_error)
error(__vc_coroutine_error)
local success, err = coroutine.resume(co)
if not success then
debug.error(err)
error(err)
end
return coroutine.status(co) ~= "dead"
end
+3
View File
@@ -20,6 +20,9 @@ void main() {
if (alpha < 0.2f)
discard;
alpha = 1.0;
} else {
if (alpha < 0.002f)
discard;
}
f_color = mix(a_color * tex_color, vec4(fogColor,1.0),
min(1.0, pow(depth*u_fogFactor, u_fogCurve)));