0

I used DiffusedMap in PhongMaterial to add texture to my mesh but I noticed that at texture coordinate (0,0) it blends the texture color with (1,0). This is expected if Javafx defaults to REPEAT, so I tried to set it to CLAMP but couldn't find any method in PhongMaterial to do that.

Is there a way to set texture wrap to CLAMP? Or are we always stuck with REPEAT textures in Javafx?

Saeid Nourian
  • 1,606
  • 15
  • 32
  • D3D and ES2 PhongMaterial implementations (private API in any case) use indeed values of `Texture.WrapMode.REPEAT` for getCachedTexture, so I don't think this is something you can change. It is probably easier to play around with the texture coordinates of your mesh? – José Pereda Mar 05 '23 at 19:35
  • That's disappointing. Yes I did use texture coordinates as a workaround to get close to what I want but it's not exact. – Saeid Nourian Mar 05 '23 at 20:22

0 Answers0