Nope, only NV supports 'arb' programs with newer profiles.
How long does your shader take to compile? Can you offload compilation to separate thread?
Nope, only NV supports 'arb' programs with newer profiles.
How long does your shader take to compile? Can you offload compilation to separate thread?
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...
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.
I want to try to keep my code hidden (not human-readable). I don't want my code to be reverse engineered.
Do you think people can't reverse engineer HLSL compiled assembly?I don't want my code to be reverse engineered.
In general, you gave up the right to secrecy the moment you started using shaders of any form.
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.
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.![]()
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).
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.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.