Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update runtimegame-pixi-renderer.ts #6289

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

Jurfix
Copy link

@Jurfix Jurfix commented Jan 28, 2024

This is necessary to make it possible to change the transparency of the GD background.
Without this change background.alpha simply doesn't make sense, it just doesn't work.
Test code:
const { background } = runtimeScene.getGame().getRenderer().getPIXIRenderer();
background.clearBeforeRender = false;
background.alpha = 0; //or 0 - 1,

This is necessary to make it possible to change the transparency of the GD background.
const { background } = runtimeScene.getGame().getRenderer().getPIXIRenderer();
background.clearBeforeRender = false;
background.alpha = 0;
@Jurfix Jurfix requested a review from 4ian as a code owner January 28, 2024 23:01
@Jurfix
Copy link
Author

Jurfix commented Feb 1, 2024

More details:
pixijs/pixijs#10162 (comment)

@Silver-Streak
Copy link
Collaborator

From reading the linked post, it explicitly mentions that enabling alpha on background has a performance impact.

Does this change only enable it if it is enabled in the project? If its not a toggle/option/conditional, I would think most people wouldn't want this change due to the perfomance impact.

@Jurfix
Copy link
Author

Jurfix commented Feb 2, 2024

From reading the linked post, it explicitly mentions that enabling alpha on background has a performance impact.

Does this change only enable it if it is enabled in the project? If its not a toggle/option/conditional, I would think most people wouldn't want this change due to the perfomance impact.

Yes, I also read this just yesterday, then we need to make a switch or something similar in the scene or project settings

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants