website logo
Auteur
avatar
AmiDARK

Forum » » OS4 toutes plateformes confondues » » A propos de Warp3D


Posté : 07-01-2013 14:18 icone du post

@Thellier :
Je ne pense pas qu'OpenGL prenne toujours la plus petite texture pour optimiser.
C'est toi qui choisi quand tu appliques ta texture au modèle (ou à la création de cette dernière en mémoire) :

void glTexParameterf( GLenum â target,
â GLenum â pname,
â GLfloat â param);
void glTexParameteri( GLenum â target,
â GLenum â pname,
â GLint â param);

target
Specifies the target texture, which must be either GL_TEXTURE_1D, GL_TEXTURE_2D, GL_TEXTURE_3D, or GL_TEXTURE_CUBE_MAP.

pname
Specifies the symbolic name of a single-valued texture parameter. pname can be one of the following: GL_TEXTURE_MIN_FILTER, GL_TEXTURE_MAG_FILTER, GL_TEXTURE_MIN_LOD, GL_TEXTURE_MAX_LOD, GL_TEXTURE_BASE_LEVEL, GL_TEXTURE_MAX_LEVEL, GL_TEXTURE_WRAP_S, GL_TEXTURE_WRAP_T, GL_TEXTURE_WRAP_R, GL_TEXTURE_PRIORITY, GL_TEXTURE_COMPARE_MODE, GL_TEXTURE_COMPARE_FUNC, GL_DEPTH_TEXTURE_MODE, or GL_GENERATE_MIPMAP.

param
supplies a function for minifying the texture as one of the following:

GL_NEAREST
Returns the value of the texture element that is nearest (in Manhattan distance) to the center of the pixel being textured.

GL_LINEAR
Returns the weighted average of the four texture elements that are closest to the center of the pixel being textured. These can !!!include!!! border texture elements, depending on the values of GL_TEXTURE_WRAP_S and GL_TEXTURE_WRAP_T, and on the exact mapping.

GL_NEAREST_MIPMAP_NEAREST
Chooses the mipmap that most closely matches the size of the pixel being textured and uses the GL_NEAREST criterion (the texture element nearest to the center of the pixel) to produce a texture value.

GL_LINEAR_MIPMAP_NEAREST
Chooses the mipmap that most closely matches the size of the pixel being textured and uses the GL_LINEAR criterion (a weighted average of the four texture elements that are closest to the center of the pixel) to produce a texture value.

GL_NEAREST_MIPMAP_LINEAR
Chooses the two mipmaps that most closely match the size of the pixel being textured and uses the GL_NEAREST criterion (the texture element nearest to the center of the pixel) to produce a texture value from each mipmap. The final texture value is a weighted average of those two values.

GL_LINEAR_MIPMAP_LINEAR
Chooses the two mipmaps that most closely match the size of the pixel being textured and uses the GL_LINEAR criterion (a weighted average of the four texture elements that are closest to the center of the pixel) to produce a texture value from each mipmap. The final texture value is a weighted average of those two values.

D'ailleurs, comme toi je n'ai rien trouvé dans les specs d'OpenGL qui puisse confirmer que ce soit le cas (ou pas) :p
Sachant qu'en plus, lorsque tu crées ta texture, tu peux la créer SANS mipmap level. Ce qui fait qu'il est forcé (dans ce cas là) d'utiliser la texture de base pour le rendu.

Maintenant, pour l'anisotropic filtering :
http://en.wikipedia.org/wiki/Anisotropic_filtering
Le mieux c'est carrément de lire le wiki qui décrit comment ça fonctionne.
J'ai pas tout compris mais bon ... c'est déjà mieux que rien :p

@+

Message édité par : AmiDARK / 07-01-2013 14:20
Message édité par : Creols / 07-01-2013 16:02

Cet article provient de Le site des utilisateurs francophones actuels et futurs d'AmigaOS 4.x
https://amiga-ng.org/viewtopic.php?topic=1442&forum=6