JavaFX 3D Feature request: Ability to set texture wrap mode for PhongMaterial

Risto Vaher ristovaher1213 at gmail.com
Sat Jun 8 19:51:49 UTC 2024


Hi, sometimes it is useful to clamp texture coordinates that exceed the
normal 0-1 range, however currently the default behaviour is to repeat them
and there is no way to configure it.
It would be useful to have a TextureWrap property in the PhongMaterial
class that would have options like REPEAT, CLAMP, MIRRORED_REPEAT, but the
first 2 would be enough.
I am currently trying to replicate the rendering of a custom engine that
clamps texture coordinates using the JavaFX 3D api however currently it
doesn't seem like it's possible.

Alternative would be to have some sort of a Texture class that is part of
the PhongMaterial which would have that property instead, it could also
have additional properties like texture filtering mode (as right now there
is no way to configure that either).
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/openjfx-dev/attachments/20240608/e5d5a6f2/attachment.htm>


More information about the openjfx-dev mailing list