View Full Version : Emulate directx wrapping with Opengl

11-11-2010, 02:34 PM

I would like to emulate the following wrapping mode of Directx:

Does anyone know a way to achieve this with Opengl in Linux?

Thanks in advance

11-11-2010, 03:18 PM
AFAIK it is not possible in OpenGL.
This has already been discussed on these forums, quite a long time ago. Try searching.

Do you have a practical use case for this ?

11-11-2010, 03:24 PM
yes, to implement it in wine. Some games use that.

11-11-2010, 03:56 PM
I must admit I have no idea how to implement this with any efficiency.

Short of triplicating each texcoord (with shifts 0, -1, +1) then deciding in the fragment shader which one to use according to the smallest derivative ...

EDIT : scratch that, it should be in texcoord space instead of fragment space ... well no idea

Maybe some people here have better clever ideas ?