Jump to content

DirectX and OpenGL Textures do not match in y coordinate


photo

Recommended Posts

Hello,

we do have issues when creating a Texture Object the y coordinates don't match between opengl and directx. The used textures are upside down in this case.

This bug can be seen in 2.11 and 2.13, maybe older versions too.

Is there any quick fix?

Thanks

directx_texture.PNG

opengl_texture.PNG

texture_swap_reproducer.zip

Link to comment

How can I flip a Texture object? Is there a method or do I need to manually change pixeld data?

Do I need to flip the Texture object every time after rendering to it?

Should this not be API independently?

Link to comment

The easiest way to do this is write a custom shader that will flip the incoming texture and call it after each renderTexture(). Do you need any help with this?

We can't automatically do this because we don't really know when and how this texture will be used after (will it be assigned to an object or directly displayed on screen as in your scenario).

Thanks!

How to submit a good bug report
---
FTP server for test scenes and user uploads:

Link to comment

We are using this in 2 ways right now. For displaying directly and postprocessing it in a shader.

I did already the workarround for displaying directly, by swapping the texture coordinates of a plane, but I think using the uv_transform would be a better solution.

The second use case is in a compute shader, so I may duplicate this code and change it for directx then.

Link to comment
×
×
  • Create New...