Wish: Adding BGRA format to images and textures!


photo

Recommended Posts

Like how the title says. Having BGRA as a texture format will solve some problems for me. Is quite funny how most of the engines supports this texture format , including DirectX but Unigine doesn't .

  • Like 1
Link to post

Hello,

I am mostly work with video from hardware, Media from HDD.  I am combining these things since Directx 7 till DirectX 11 and now with Unreal and UNIGINE. I always had this RGBA to BGRA conversion requirements. But my requirements also had RGBA textures, Virtual Graphics etc. So I always worked with RGBA and used pre and post conversions.

In my opinion you are not free to mix such formats, as once you define your swap chain format, the graphics pipeline with respect this format throughout.

So adding this format will not help exactly unless all your graphics pipeline is only in this format.  If you are asking this as your whole framework is in BGRA8888 or BGRA16F (anything) then it make sense as it would be harder for you to manage pre and post conversions. 

Otherwise, The simplest solution is to write a pixel shader, (material in UNIGINE) for this conversion. 

Regards,

Rohit

  • Like 2
Link to post
10 hours ago, silent said:

a.octavian

As far as I understand you are talking about BGRA8888 texture format? Will it be enough for your use-case?

Thanks!

Yeah that should be enough. Just if is possible of course.

Link to post

Hi, octavian!
You can use this simple material to convert your texture from RGBA to BGRA. Just use
 

(Your Material)->renderScreen(Render::PASS_POST);


Hope it helps.


RGBAtoBGRA.basemat

  • Like 2
  • Thanks 1
Link to post

a.octavian

I would agree with Rohit here - it's would be much easier to use a simple shader for conversion between different color spaces. BGRA format support will be added in the future (but not in 2.14).

Right now this task has the low priority.

Thanks!

  • Like 1

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

Link to post