Merge pull request #843 from redbirdly/main

Fix flicker in lightmap.js
This commit is contained in:
slweeb 2024-11-10 22:07:54 -05:00 committed by GitHub
commit e8dbf838c8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 0 deletions

View File

@ -184,6 +184,8 @@ function renderLightmapPrePixel(ctx) {
var newColor = hsvToRgb(h, s, 1);
var alpha = v;
ctx.globalAlpha = 1.0;
ctx.fillStyle = `rgba(${newColor[0]}, ${newColor[1]}, ${newColor[2]}, ${alpha * 0.4})`;
ctx.fillRect(
x * pixelSize * lightmapScale,

View File

@ -184,6 +184,8 @@ function renderLightmapPrePixel(ctx) {
var newColor = hsvToRgb(h, s, 1);
var alpha = v;
ctx.globalAlpha = 1.0;
ctx.fillStyle = `rgba(${newColor[0]}, ${newColor[1]}, ${newColor[2]}, ${alpha * 0.4})`;
ctx.fillRect(
x * pixelSize * lightmapScale,