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

Improper Shader Subclass handling #10581

Open
JPMeehan opened this issue Mar 20, 2024 · 1 comment
Open

Improper Shader Subclass handling #10581

JPMeehan opened this issue Mar 20, 2024 · 1 comment
Labels
bug Functionality which is not working as intended canvas Issues related to the PIXI canvas, rendering, and other WebGL functions.

Comments

@JPMeehan
Copy link

Running into a specific shader typing issue while working on the Types project.

  1. RenderedSource##createMesh(shaderCls) constructs the mesh with new PointSourceMesh(this.#geometry, shaderCls.create(), state)
  2. shaderCls is annotated as typeof AdaptiveLightingShader
  3. AdaptiveLightingShader extends AbstractBaseShader extends BaseShaderMixin(PIXI.Shader)
  4. PointSourceMesh extends PIXI.Mesh, and the second argument in that constructor is expected to be PIXI.MeshMaterial
  5. PIXI.MeshMaterial extends PIXI.Shader, adding properties that are NOT present in the AdaptiveLightingShader inheritance chain.

TL;DR PointSourceMesh canonically expects a different subclass of PIXI.Shader than is provided by Foundry in actual use.


Separate from #10227 because this seems to be a deeper issue in class construction.

@JPMeehan JPMeehan changed the title Improper Extension handling Improper Shader Subclass handling Mar 20, 2024
@Feu-Secret Feu-Secret self-assigned this Mar 20, 2024
@Feu-Secret Feu-Secret added bug Functionality which is not working as intended canvas Issues related to the PIXI canvas, rendering, and other WebGL functions. labels Mar 20, 2024
@Feu-Secret Feu-Secret added this to the V12 - API Development 2 milestone Mar 20, 2024
@aaclayton
Copy link
Contributor

bumping to high priority in case this requies API changes. @Feu-Secret to take a quick look. If not we can downgrade it back to the testing phase.

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 canvas Issues related to the PIXI canvas, rendering, and other WebGL functions.
Projects
None yet
Development

No branches or pull requests

3 participants