fix main shader & lua parser

This commit is contained in:
MihailRis 2025-01-15 02:57:58 +03:00
parent d3e2ad5e99
commit 00ce65ef66
2 changed files with 5 additions and 1 deletions

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)));

View File

@ -113,8 +113,9 @@ public:
auto start = currentLocation();
if (is_lua_identifier_start(c)) {
auto name = parseLuaName();
TokenTag tag = (is_lua_keyword(name) ? TokenTag::KEYWORD : TokenTag::NAME);
emitToken(
is_lua_keyword(name) ? TokenTag::KEYWORD : TokenTag::NAME,
tag,
std::move(name),
start
);