Skip to content

Commit 2932b88

Browse files
TracyGardnerTracyGardner
authored andcommitted
Make gradient background unaffected by scene lighting
Set background layer's alpha blending mode to disable and texture's hasAlpha to false. Replit-Commit-Author: Agent Replit-Commit-Session-Id: 2ada40c2-c083-4794-9179-1abaa00b4437 Replit-Commit-Checkpoint-Type: full_checkpoint Replit-Commit-Event-Id: 8bf651fe-9f0a-4062-add6-3b56da178c7c Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/1099a351-df60-40b5-bf61-4999bad0d153/2ada40c2-c083-4794-9179-1abaa00b4437/HcCrJhS
1 parent e1f75ec commit 2932b88

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

api/scene.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,10 @@ export const flockScene = {
6666
const layer = new flock.BABYLON.Layer("backgroundGradientLayer", null, flock.scene, true);
6767
layer.texture = dt;
6868
layer.isBackground = true;
69+
70+
// Ensure the layer is completely unlit and unaffected by scene lighting
71+
layer.alphaBlendingMode = flock.BABYLON.Constants.ALPHA_DISABLE;
72+
dt.hasAlpha = false;
6973
dt.wrapU = flock.BABYLON.Texture.CLAMP_ADDRESSMODE;
7074
dt.wrapV = flock.BABYLON.Texture.CLAMP_ADDRESSMODE;
7175

0 commit comments

Comments
 (0)