Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Page 2 of 2 FirstFirst 12
Results 11 to 19 of 19

Thread: Binary shaders support in OpenGL

  1. #11
    Member Regular Contributor
    Join Date
    Apr 2009
    Posts
    258
    Nope, only NV supports 'arb' programs with newer profiles.

    How long does your shader take to compile? Can you offload compilation to separate thread?

  2. #12
    Junior Member Newbie
    Join Date
    May 2012
    Posts
    14
    It has two combinatio of fragment / vertex shaders. One for raytracing and other for computing shadows. They take about 2-3 minutes using HLSL compiler (together).

    I think I found a solution. I transformed HLSL compiled assembly into GLSL code. I't not human-readable, but compiles in a few seconds...

  3. #13
    Advanced Member Frequent Contributor
    Join Date
    Apr 2010
    Location
    Germany
    Posts
    892
    Have you tried to port the HLSL source code to GLSL at some point? And how complex are your shaders if they take 2-3 minutes? For just 2 shader programs that sounds like an awful lot.

    BTW: I'm aware you don't want to compile from source everytime. I just don't see why you would transform HLSL assembly instead of just trying to port to GLSL directly.

  4. #14
    Junior Member Newbie
    Join Date
    May 2012
    Posts
    14
    I want to try to keep my code hidden (not human-readable). I don't want my code to be reverse engineered.

  5. #15
    Senior Member OpenGL Guru
    Join Date
    May 2009
    Posts
    4,712
    I don't want my code to be reverse engineered.
    Do you think people can't reverse engineer HLSL compiled assembly?

    In general, you gave up the right to secrecy the moment you started using shaders of any form.

  6. #16
    Junior Member Newbie
    Join Date
    May 2012
    Posts
    14
    Shaders I wrote are too complex to be reverse engineered. Too much optimization is applied. Only vertex shaders are simple enough to be reverse engineered.

    Also, generated assembly is a few hundred lines of code long and less readable than disassembly of an executable file.

    It would take weeks to get an idea of how those shaders work. This code simply isn't worth that much of someone's time.

  7. #17
    Advanced Member Frequent Contributor
    Join Date
    Apr 2010
    Location
    Germany
    Posts
    892
    Just out of curiosity, are your working on some paper or some work for a company doing new stuff worthy of protection like that? Raytracing and "computing shadows" don't sound revolutionary enough to try and hide it from hungry eyes.

  8. #18
    Junior Member Newbie
    Join Date
    May 2012
    Posts
    14
    I develop shaders and earn money for that.

    They're nothing revolutionary (maybe a few tricks in some of them).

    The only reason I wan't to hide their source is because I spent many hours developing them and don't want them to be publicly available on the internet (protecting my business).

  9. #19
    Senior Member OpenGL Guru
    Join Date
    May 2009
    Posts
    4,712
    Shaders I wrote are too complex to be reverse engineered. Too much optimization is applied. Only vertex shaders are simple enough to be reverse engineered.

    Also, generated assembly is a few hundred lines of code long and less readable than disassembly of an executable file.
    Keep dreaming. A few hundred lines of code is nothing to reverse engineer. Worst-case, for someone who has a pretty good understanding of what your shader is trying to do, it might take a day to figure it out.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •