[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Public WebGL] Textures and mip-mapping question

On 13/04/19 15:17, Benoit Jacob wrote:
On 13-04-19 04:26 AM, Kirill Prazdnikov wrote:

I have an issue with texture mapping:
 Any texture which does not have the generateMipmap call rendered as black.

Also any non-power of two texture images rendered as black.
I use the latest Firefox build on windows.

I have read all the spec about texturing here:
And haven not found any mention about the fact that only power-of-two textures supported and all mip-maps have to be generated.

Is there intended or probably a bug in Firefox ?

What Florian said; plus: if you open the Web Console, make sure JS warnings are enabled, and reload your page, you will get a detailed warning message about why your texture is being rendered as black.

Florian focused on NPOT issues and missed the more fundamental issue.

The fundamental issue, which is one of the pitfalls most new OpenGL programmers fall into, is that the default value of MIN_FILTER, NEAREST_MIPMAP_LINEAR, is one which requires a complete mipmap pyramid. If you change MIN_FILTER to NEAREST or LINEAR you will not need to call generateMipmap.



注意:この電子メールには、株式会社エイチアイの機密情報が含まれている場合が有ります。正式なメール受信者では無い場合はメール複製、 再配信または情報の使用を固く禁じております。エラー、手違いでこのメールを受け取られましたら削除を行い配信者にご連絡をお願いいたし ます.

NOTE: This electronic mail message may contain confidential and privileged information from HI Corporation. If you are not the intended recipient, any disclosure, photocopying, distribution or use of the contents of the received information is prohibited. If you have received this e-mail in error, please notify the sender immediately and permanently delete this message and all related copies.