[X3D-Public] PixelTexture render problems in major browsers

Michalis Kamburelis michalis.kambi at gmail.com
Sun Feb 13 13:15:55 PST 2011

Don Brutzman wrote:
> Thanks for all of the helpful replies!  Problem is much clearer now.
> It would seem that a specification clarification is needed to
> avoid ambiguous results when rendering X3D scenes like these.
> Hmmm, we could set default value as
>     <TextureProperties magnificationFilter='NEAREST_PIXEL'/>

NEAREST_PIXEL will look ugly on normal (larger) textures.

> or maybe should the default be adjusted depending on texture size?

I would vote for this. Something like "If the <TextureProperties> node
is not present, the browsers should automatically choose the texture
filtering method. If all the texture sizes are <= 32 then the default
magnification filtering should be NEAREST_PIXEL, otherwise it should be

(Note the wording "all the texture sizes", not just "both texture
sizes", as we have 3D textures as well.)

The same wording can be added to the interpretation of "DEFAULT" values
for TextureProperties.magnificationFilter.

And I would keep the wording as "suggestion" only, not a strict requirement.

> What if we changed spec defaults from FASTEST to NICEST? in other words
>     SFString    [in,out] magnificationFilter "FASTEST" [see Table 18.8]
>     SFString    [in,out] minificationFilter  "FASTEST" [see Table 18.9]
> to
>     SFString    [in,out] magnificationFilter "NICEST"  [see Table 18.8]
>     SFString    [in,out] minificationFilter  "NICEST"  [see Table 18.9]

Changing the defaults here will not solve your problem, as far as I see.
The problem with your PixelTexture example lies in the definition of
"NICEST" --- what is the highest quality?

- For large textures, to get NICEST results you should probably use
AVG_PIXEL (with mipmaps for minification).

- For small textures, to get NICEST results you probably want NEAREST_PIXEL.

But most browsers, my included, define NICEST = always AVG_PIXEL (with
mipmaps for minification), because it's unclear when exactly a texture
should be considered "large" and when "small". If we want to fix it,
specification should suggest such limit (like 32), in my opinion.

Besides, if we change the default, I would prefer to change default
magnificationFilter and minificationFilter to be "DEFAULT" ("Select the
browser-specified default magnification/minification mode" from spec).
The idea is to allow browsers be smart. User should need to override the
browser defaults only when doing something uncommon.


More information about the X3D-Public mailing list