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

Detection filters are not working with transparent token mesh #9023

Closed
1 of 6 tasks
dev7355608 opened this issue Mar 7, 2023 · 0 comments
Closed
1 of 6 tasks

Detection filters are not working with transparent token mesh #9023

dev7355608 opened this issue Mar 7, 2023 · 0 comments
Assignees
Labels
bug Functionality which is not working as intended vision Issues related to Token vision and vision modes

Comments

@dev7355608
Copy link

What happened?

We need to temporarily override worldAlpha and tint should be probably too.

  /** @override */
  render(renderer) {
    if ( this.#detectionFilter ) {
      this.#detectionFilter.enabled = true;
      const originalTint = this.mesh.tint;
      const originalAlpha = this.mesh.worldAlpha;
      this.mesh.tint = 0xFFFFFF;
      this.mesh.worldAlpha = 1;
      this.mesh.pluginName = BaseSamplerShader.classPluginName;
      this.mesh.render(renderer);
      this.mesh.tint = originalTint;
      this.mesh.worldAlpha = originalAlpha;
      this.mesh.pluginName = null;
      this.#detectionFilter.enabled = false;
    }
    super.render(renderer);
  }

Even if these are overridden, there still could be filters attached to the token mesh that could mess with the detection filter, but I guess that is a different issue.

What ways of accessing Foundry can you encounter this issue in?

  • Native App (Electron)
  • Chrome
  • Firefox
  • Safari
  • Other

Reproduction Steps

Place a token with Feel Tremor on on side of a wall. On the other side of the wall place a token and set its Token Opacity to 0.5. Select the token with Feel Tremor. The Feel Tremor detection filter won't be visible.

What core version are you reporting this for?

Version 11 Prototype 2 (build 293)

Relevant log output

No response

Bug Checklist

  • The issue occurs while all Modules are disabled
@dev7355608 dev7355608 added the bug Functionality which is not working as intended label Mar 7, 2023
@aaclayton aaclayton added the vision Issues related to Token vision and vision modes label Mar 7, 2023
@Feu-Secret Feu-Secret self-assigned this Mar 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Functionality which is not working as intended vision Issues related to Token vision and vision modes
Projects
Status: Done
Development

No branches or pull requests

3 participants