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: [v8] Multiple issues with mipmaps #10424
Comments
Update: Also, when increasing the texture source size to 8192px, even the first method with And this happens only in mobile Google Chrome, it works fine in mobile Firefox on the same device. On v7 the same code worked fine in both browsers and with maximum texture source size. |
hey @ucarno , could you try forcing webgl? just keen to ascertain if this is a GPU issue or not. Thanks! |
oh, nevermind - i see its set to webgl! |
This was more of an optimisation that updateMipmaps() is something pixi users can have full control of.
|
autoGenerateMipmaps: false and mipLevelCount: 12 and updateMipmaps() is not called - black square for this combo, the mipmaps are not created as autoGenerateMipmaps is false, but the levels are set to 12. This means Pixi is assuming the dev will handle rendering to the various mipmap levels. |
With RenderTextures - if it has mipmaps of any kind (auto generated, or specified via mipLevelCount). Devs will need to call updateMipmaps() to ensure all mip levels are all updated. I will have a think on how we could generate them 'just in time'. eg flag it as dirty and update it at the point of render. You should be able to achieve your goals with the current set up though i hope! Let me know! Cheers |
Thanks! |
Current Behavior
There are different results depending on the inputs:
autoGenerateMipmaps: true
andupdateMipmaps()
is called - mipmap works, but is inneficiently updated on every TextureSource updateautoGenerateMipmaps: true
andupdateMipmaps()
is not called - blank textureautoGenerateMipmaps: false
andmipLevelCount: 12
andupdateMipmaps()
is not called - black squareautoGenerateMipmaps: false
andmipLevelCount: 12
andupdateMipmaps()
is called - also black squareautoGenerateMipmaps: false
andmipLevelCount: 1
andupdateMipmaps()
is called - there is no black square anymore, but mipmap does not workautoGenerateMipmaps: false
andmipLevelCount: undefined
andupdateMipmaps()
is called - behaves the same way as above,console.log(textureSource.mipLevelCount)
producesundefined
even after callingupdateMipmaps()
Expected Behavior
updateMipmaps()
?mipLevelCount
based on texture dimensions and render the thing with mipmapsSteps to Reproduce
Here is the playground:
https://www.pixiplayground.com/#/edit/bgHHESUn_pYGjja4WYr-Q
Uncomment desired situation to see results
Environment
pixi.js
version: 8.0.5Possible Solution
No response
Additional Information
For the context: I am rendering a lot of things onto a TextureSource just once on app launch and can't get mipmaps to work without passing
autoGenerateMipmaps: true
to new TextureSource.The text was updated successfully, but these errors were encountered: