• Products
    • Isadora
    • Get It
    • ADD-ONS
    • IzzyCast
    • Get It
  • Forum
  • Help
  • Werkstatt
  • Newsletter
  • Impressum
  • Dsgvo
  • Press
  • Isadora
  • Get It
  • ADD-ONS
  • IzzyCast
  • Get It
  • Press
  • Dsgvo
  • Impressum

Navigation

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Popular
    • Tags

    [ANSWERED] 16-Bit Textures for GLSL?

    How To... ?
    4
    6
    1205
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • J
      jg Beta Tester last edited by mark

      Hi-

      Is there a way to use 16-bit textures in Isadora? I'm attempting to make a simple resampling shader, but the output is pixelated because it seems as though the texture I'm using as the UV map is being converted to 8-bit. All I found regarding bit depth in Izzy is an old post (https://community.troikatronix...). Has this changed at all? Is it possible to use higher bit depths for shaders? 

      I believe my code is fine (attached below for reference), because it works in TouchDesigner (with some interface modifications). I can reproduce the pixellation issue in TD by lowering the bit depth of the image.

      UV Map

      Any advice would be appreciated- thanks!

      : j

      // GLSL below //

      uniform sampler2D tex0;
      uniform sampler2D tex1;

      void main(void) {
      vec3 uv = texture2D(tex1, gl_TexCoord[0].xy).rgb;
      vec3 c0 = texture2D(tex0, uv.xy).rgb;

      gl_FragColor = vec4(c0, 1.0);
      }

      mark Fred 2 Replies Last reply Reply Quote 0
      • Woland
        Woland Tech Staff last edited by

        @Fred 

        You're much smarter and far more shader-savvy than I am. Any thoughts on this?

        Best wishes,

        Woland

        TroikaTronix Technical Support
        New Support Ticket: https://support.troikatronix.com/support/tickets/new
        Support Policy: https://support.troikatronix.com/support/solutions/articles/13000064762
        Add-Ons: https://troikatronix.com/add-ons/ & https://troikatronix.com/add-ons/?u=woland
        Professional Services: https://support.troikatronix.com/support/solutions/articles/13000109444

        | Isadora Version: all of them | Mac Pro (Late 2013), macOS 10.14.6, 3.5GHz 6-core, 1TB SSD, 64GB RAM, Dual AMD FirePro D700s |

        1 Reply Last reply Reply Quote 0
        • mark
          mark @jg last edited by mark

          @jg said:

          Is there a way to use 16-bit textures in Isadora?

          At the moment, no. All textures in Isadora are 8-bit ARGB. That is something we hope to change in a future release, because having 10 bit textures (at least) would improve the look of fine gradations.

          But what confuses me is that the image you provided above is only 8 bit in the first place. Here's the info for your picture using the macOS command sips:

            pixelWidth: 1024
            pixelHeight: 576
            typeIdentifier: public.png
            format: png
            formatOptions: default
            dpiWidth: 72.000
            dpiHeight: 72.000
            samplesPerPixel: 4
            bitsPerSample: 8
            hasAlpha: yes
            space: RGB

          As you can see there are only 8 bits per pixel. So why would a 16 bit texture solve the problem? It would just be the 8 bit values multiplied by 256.

          Best Wishes,
          Mark

          Media Artist & Creator of Isadora
          Macintosh SE-30, 32 Mb RAM, MacOS 7.6, Dual Floppy Drives

          1 Reply Last reply Reply Quote 0
          • J
            jg Beta Tester last edited by

            I believe the forum resizes it on upload or something. It seems to have changed the name as well- I uploaded "uvWarp.png" (dropbox link here: Dropbox), but when I download the file back from the forum, the file name has been changed to "1595643849000-uvwarp-resized.png." It seems like both the resolution and bit depth change in that process.


            : j

            1 Reply Last reply Reply Quote 1
            • mark
              mark last edited by mark

              @jg said:

              I believe the forum resizes it on upload or something.

               Yes, you are correct. It shows your file from dropbox to be 16 bit. It's really good to know that the forum does stuff to these images... I was unaware of that.

              Best Wishes,
              Mark

                pixelWidth: 1280
                pixelHeight: 720
                typeIdentifier: public.png
                format: png
                formatOptions: default
                dpiWidth: 72.000
                dpiHeight: 72.000
                samplesPerPixel: 4
                bitsPerSample: 16
                hasAlpha: yes
                space: RGB
                profile: Generic RGB Profile

              Best Wishes,
              Mark

              Media Artist & Creator of Isadora
              Macintosh SE-30, 32 Mb RAM, MacOS 7.6, Dual Floppy Drives

              1 Reply Last reply Reply Quote 1
              • Fred
                Fred @jg last edited by

                @jg how did you generate the 16bit image? it is static, could you split it into 2 8 bit images and use that inside Isadora with another texture input and then calculate a 16bit value from the 2 8 bit values.

                http://www.fredrodrigues.net/
                https://github.com/fred-dev
                OSX 13.6.4 (22G513) MBP 2019 16" 2.3 GHz 8-Core i9, Radeon Pro 5500M 8 GB, 32g RAM
                Windows 10 7700K, GTX 1080ti, 32g RAM, 2tb raided SSD

                1 Reply Last reply Reply Quote 0
                • First post
                  Last post