Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

strange issue when LoadRawTextureData to RGBA4444

Discussion in 'Scripting' started by Waka_Waka, May 21, 2015.

  1. Waka_Waka

    Waka_Waka

    Joined:
    May 21, 2015
    Posts:
    3
    Hi everyone,
    I'm trying to load raw image data into a RGBA4444 format texture at runtime. the resulted image looks quite lighter than the original one:

    Left: original. Right: runtime loaded
    result.jpg

    Any ideas? Thanks!
     
    Last edited: May 21, 2015
  2. Waka_Waka

    Waka_Waka

    Joined:
    May 21, 2015
    Posts:
    3
    Solved.
    Turned out that OpenGL uses little endian. The bytes are stored as BARG instead of RGBA for 16bit textures.
     
  3. heximal

    heximal

    Joined:
    Mar 6, 2016
    Posts:
    1
    How did you produce RGBA4444 image? I broken my mind. I'm trying to convert PNG to raw RGBA4444.