mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-05 19:11:50 +00:00
Merge branch 'main' into animation
This commit is contained in:
commit
eca7eeadee
7 changed files with 39 additions and 19 deletions
|
|
@ -144,6 +144,7 @@ void BlockWrapsRenderer::draw(const DrawContext& pctx) {
|
|||
auto& shader = assets.require<Shader>("entity");
|
||||
shader.use();
|
||||
shader.uniform1i("u_alphaClip", false);
|
||||
shader.uniform1i("u_dithering", 0);
|
||||
|
||||
for (const auto& [_, wrapper] : wrappers) {
|
||||
if (wrapper->dirtySides) {
|
||||
|
|
@ -198,4 +199,4 @@ void BlockWrapsRenderer::clearOrder(const BlockWrapper* const wrapper) {
|
|||
++it;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -244,6 +244,7 @@ void WorldRenderer::renderOpaque(
|
|||
}
|
||||
|
||||
entityShader.uniform1i("u_alphaClip", true);
|
||||
entityShader.uniform1i("u_dithering", 1);
|
||||
entityShader.uniform1f("u_opacity", 1.0f);
|
||||
level.entities->render(
|
||||
assets,
|
||||
|
|
@ -512,6 +513,7 @@ void WorldRenderer::renderWeatherEffects(Camera& camera) {
|
|||
float one = weather->fall.maxOpacity;
|
||||
float t = (weather->intensity * (one - zero)) * maxIntensity + zero;
|
||||
entityShader.uniform1i("u_alphaClip", weather->fall.opaque);
|
||||
entityShader.uniform1i("u_dithering", 0);
|
||||
entityShader.uniform1f(
|
||||
"u_opacity", weather->fall.opaque ? t * t : t
|
||||
);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue