Thanks to Matthias (Free Pascal meets SDL) we now support “mirrored repeat” mode for textures, for both glTF and X3D models. We also support X3D TTexturePropertiesNode.BoundaryModeS/T/R properties, which allow to request a wrapping mode — clamp, repeat, or mirrored repeat. (see TBoundaryMode)
The way you would request it in Pascal is by creating and adjusting
TextureProperties := TTexturePropertiesNode.Create; TextureProperties.BoundaryModeS := bmMirroredRepeat; TextureProperties.BoundaryModeT := bmMirroredRepeat; MyImageTexture.TextureProperties := TextureProperties;
You can experiment with the example code that builds a mesh using Pascal to add there
Another related fix is that we fixed the default values of
TTexturePropertiesNode.MagnificationFilter. By default, they now indicate to use minification/magnification specified in
MyScene.RenderOptions, which means that merely adding a
TTexturePropertiesNodedoesn’t make the filtering uglier. This was fixed in X3D 4.0 some time ago (after my request) and CGE now follows, so we have a saner default.
The documentation about TextureProperties node was extended to mention it all.