Closed SiddharthSham closed 3 years ago
I would need more info about your circumstance - perhaps create a code sandbox outlining the issue?
I have a feeling that your texture's width or height is not a power of two, but as I said, I don't have enough info to help further.
Closing this as I don't believe it's a bug, however feel free to reply with a working example. Also StackOverflow is probably a better place for individual support.
You're right, my texture was non-power-of-2. Because of the defaults I thought that OGL was internally handling that and switching to the right filtering, but apparently not.
This is not a bug, but implementing this could be a feature. Shall I raise a PR?
Yeah interesting, it actually does handle it for you if you leave generateMipmaps
set to true
.
I assume it wouldn't be too difficult to rework that check to make sure ALL of the settings are correct (mipmap, wrapping, filtering), however I don't have all of the possible use-cases in my mind at the current time. Please feel free to create a PR!
When using WebGL1 and setting
generateMipmaps: false
, the texture refuses to render (only displays black, the default empty texture) . SettingminFilter: this.gl.LINEAR
solves this issue.Is there something I'm doing wrong, or is this a bug?