mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-11 14:01:49 +00:00
fix main shader & lua parser
This commit is contained in:
parent
d3e2ad5e99
commit
00ce65ef66
2 changed files with 5 additions and 1 deletions
|
|
@ -20,6 +20,9 @@ void main() {
|
||||||
if (alpha < 0.2f)
|
if (alpha < 0.2f)
|
||||||
discard;
|
discard;
|
||||||
alpha = 1.0;
|
alpha = 1.0;
|
||||||
|
} else {
|
||||||
|
if (alpha < 0.002f)
|
||||||
|
discard;
|
||||||
}
|
}
|
||||||
f_color = mix(a_color * tex_color, vec4(fogColor,1.0),
|
f_color = mix(a_color * tex_color, vec4(fogColor,1.0),
|
||||||
min(1.0, pow(depth*u_fogFactor, u_fogCurve)));
|
min(1.0, pow(depth*u_fogFactor, u_fogCurve)));
|
||||||
|
|
|
||||||
|
|
@ -113,8 +113,9 @@ public:
|
||||||
auto start = currentLocation();
|
auto start = currentLocation();
|
||||||
if (is_lua_identifier_start(c)) {
|
if (is_lua_identifier_start(c)) {
|
||||||
auto name = parseLuaName();
|
auto name = parseLuaName();
|
||||||
|
TokenTag tag = (is_lua_keyword(name) ? TokenTag::KEYWORD : TokenTag::NAME);
|
||||||
emitToken(
|
emitToken(
|
||||||
is_lua_keyword(name) ? TokenTag::KEYWORD : TokenTag::NAME,
|
tag,
|
||||||
std::move(name),
|
std::move(name),
|
||||||
start
|
start
|
||||||
);
|
);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue