-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
Bug: Update Matrix uniforms crashes V8 #10553
Comments
heya! please can you provide this as a playground? I can then help address! thanks! |
Sure, here it is https://www.pixiplayground.com/#/edit/ygcHzzCAKj51Z4OBlFQ26 you can uncomment out the part that works to see that the bunny is offset to 100 px |
heya, the type should be
|
If you are using TS, it should give type safety! The PR should make it easier to catch in the future for js too! #10562 |
ahh i see, i was using typescript, but it doesnt report the type errors somehow in VS code, it says it should be type string |
Current Behavior
Unable to update uniform matrix in shader by setting the matrix as container's worldTransform
Expected Behavior
Should be able to update the uniform matrix by passing in the worldStage container's worldTransform
Steps to Reproduce
With the following shader
Updating the uniforms
// This crashes
shader.resources.uniforms.uniforms.uWorldStageTransform.a =
worldStage.worldTransform;
(in the vert shader)
mat3 mvp = uProjectionMatrix * uWorldTransformMatrix * uWorldStageTransform * uTransformMatrix;
// This works
shader.resources.uniforms.uniforms.uTx = t.tx;
shader.resources.uniforms.uniforms.uTy = t.ty;
(in the vert shader)
gl_Position = vec4((mvp * vec3(aPosition + aInstancePosition + vec2(uTx, uTy), 1.0)).xy, 0.0, 1.0) ;
error:
Environment
Pixi: 8.1.4
Possible Solution
No response
Additional Information
No response
The text was updated successfully, but these errors were encountered: