<div dir="ltr">You could obfuscate and minify your shader:<div><br></div><div><a href="https://github.com/laurentlb/Shader_Minifier">https://github.com/laurentlb/Shader_Minifier</a> <br><br>Or hire a demoscene person to mangle it. ;)<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Jan 31, 2019 at 11:43 AM Werner Modenbach <<a href="mailto:texion@modenbach-ac.de">texion@modenbach-ac.de</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi Michael and all other people responding to my request,<br>
<br>
first of all thank you very much!<br>
<br>
@Michael: What you suggest is something like asking Zuckerberg to<br>
publish his algorithms.<br>
And belief me, Chinese don't care at all about patents<br>
or other rules we usually accept here.<br>
<br>
I'm really surprised that there is no real solution for my problem.<br>
Since OpenGL 4 all developers are advised to create their own shaders.<br>
And once you get familiar<br>
with that you quickly discover the potential of it. A good portion of<br>
your know how gets transferred to shaders.<br>
This should be a common problem in the commercial field. And no solution<br>
from NVIDIA etc. ?<br>
<br>
@Robert: Thanks for pointing me to SPIR-V. I'll have a look at it.<br>
Anyway better than pure source code.<br>
Unfortunately not natively supported by OSG.<br>
<br>
Hiding shader source code inside an executable is not that problem<br>
because all our executables are encrypted.<br>
And memory spy during runtime is detected already.<br>
The problem here is the driver api.<br>
<br>
@Damian: Do you have any links for detecting OpenGL/GPU debuggers?<br>
<br>
Many, many thanks to everybody.<br>
<br>
- Werner -<br>
<br>
Am 31.01.2019 um 10:29 schrieb michael kapelko:<br>
> Hi.<br>
><br>
> You may have a look at the problem from a different angle. If someone<br>
> is stealing from you that means they need it. If you cannot stop it<br>
> (or it costs much more than simply let them have it), then you should<br>
> lead it. Instead of hiding your great shaders you can publish them<br>
> yourself (don't forget to add some notes about your company in the<br>
> comments)! This would be the marketing way of handling the problem.<br>
><br>
> On Thu, 31 Jan 2019 at 12:17, Damian Dixon <<a href="mailto:damian.dixon@gmail.com" target="_blank">damian.dixon@gmail.com</a>> wrote:<br>
>> Hi,<br>
>><br>
>> I don't know what the OSG solution to this would be.<br>
>><br>
>> You could obfuscate the shader code. Though to be honest this would only slow someone down not stop them from obtaining the shader source.<br>
>><br>
>> In addition to obfusication put the shader source into the DLL/exe and potentially hide the strings by a simple rotation or masking of the data.<br>
>><br>
>> You could add additional logic to detect OpenGL/GPU debuggers and/or check the OpenGL shared library is loaded from sensible locations.<br>
>><br>
>> The other options would be to look at the following in OpenGL. I've not used either of them so they may not work particularly well.<br>
>><br>
>> <a href="https://www.khronos.org/registry/OpenGL/extensions/ARB/ARB_gl_spirv.txt" rel="noreferrer" target="_blank">https://www.khronos.org/registry/OpenGL/extensions/ARB/ARB_gl_spirv.txt</a> (OpenGL 4.6)<br>
>> <a href="https://www.khronos.org/registry/OpenGL-Refpages/gl4/html/glShaderBinary.xhtml" rel="noreferrer" target="_blank">https://www.khronos.org/registry/OpenGL-Refpages/gl4/html/glShaderBinary.xhtml</a> (OpenGL 4.1)<br>
>><br>
>> You may find that the SPIRV extension is not widely supported yet on all GPUs and drivers (mesa support is not yet there) that your customers are using. SPIRV modules are an intermediate compiled representation of the shaders so someone with a lot of time could reverse engineer.<br>
>><br>
>> The shader binary I believe may be limited to the GPU/driver that it was compiled for.<br>
>><br>
>> Also OSG would need to be modified to use SPIRV or shader binaries.<br>
>><br>
>> Most of this is a trade off between cost of implementation, additional test and support costs and lost revenue.<br>
>><br>
>> Regards<br>
>> Damian<br>
>><br>
>><br>
>><br>
>><br>
>> On Wed, 30 Jan 2019 at 17:50, Werner Modenbach <<a href="mailto:texion@modenbach-ac.de" target="_blank">texion@modenbach-ac.de</a>> wrote:<br>
>>> Dear Robert, dear community,<br>
>>><br>
>>> I use OSG since many years now with great success. But being honest I<br>
>>> usually just use the osg api and direct gl calls are very rare in our code.<br>
>>> That's the reason why I ask people with more gl experience here.<br>
>>> I'm working in a commercial environment. Unfortunately we have very bad<br>
>>> experience about the security of our developments<br>
>>> especially with a famous Asian country. Cracking and copying is the<br>
>>> normal case there.<br>
>>> During the years we have established a quite secure environment for our<br>
>>> executables by encrypting the them and by detecting<br>
>>> debugging and sniffing tools running in parallel.<br>
>>> There is mainly one really weak part, the shaders we develop.<br>
>>> We spent years now in very complex and highly optimized shaders and I<br>
>>> have sleepless nights knowing that the shader code is<br>
>>> transferred to the driver as plain source code.<br>
>>> My question: Is there any way solving this problem? Is there any driver<br>
>>> api for that? I searched all over OSG but didn't find anything.<br>
>>> Is this feature missing in general or is it just not in the OSG api?<br>
>>> If all the questions are answered NO can anybody provide a contact to<br>
>>> NVIDIA for discussing this problem?<br>
>>><br>
>>> Many thanks in advance for any hints and help.<br>
>>><br>
>>> - Werner -<br>
>>><br>
>>><br>
>>> _______________________________________________<br>
>>> osg-users mailing list<br>
>>> <a href="mailto:osg-users@lists.openscenegraph.org" target="_blank">osg-users@lists.openscenegraph.org</a><br>
>>> <a href="http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org" rel="noreferrer" target="_blank">http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org</a><br>
>> _______________________________________________<br>
>> osg-users mailing list<br>
>> <a href="mailto:osg-users@lists.openscenegraph.org" target="_blank">osg-users@lists.openscenegraph.org</a><br>
>> <a href="http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org" rel="noreferrer" target="_blank">http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org</a><br>
> _______________________________________________<br>
> osg-users mailing list<br>
> <a href="mailto:osg-users@lists.openscenegraph.org" target="_blank">osg-users@lists.openscenegraph.org</a><br>
> <a href="http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org" rel="noreferrer" target="_blank">http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org</a><br>
<br>
<br>
_______________________________________________<br>
osg-users mailing list<br>
<a href="mailto:osg-users@lists.openscenegraph.org" target="_blank">osg-users@lists.openscenegraph.org</a><br>
<a href="http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org" rel="noreferrer" target="_blank">http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org</a><br>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div style="text-align:center">Chris 'Xenon' Hanson, omo sanza lettere. Xenon@AlphaPixel.com <a href="http://www.alphapixel.com/" target="_blank">http://www.alphapixel.com/</a></div><div style="text-align:center">Training • Consulting • Contracting</div><div style="text-align:center">3D • Scene Graphs (Open Scene Graph/OSG) • OpenGL 2 • OpenGL 3 • OpenGL 4 • GLSL • OpenGL ES 1 • OpenGL ES 2 • OpenCL</div><div style="text-align:center"><span style="font-size:12.8px">Legal/IP •</span><span style="font-size:12.8px"> </span><span style="font-size:12.8px">Forensics •</span><span style="font-size:12.8px"> </span>Imaging <span style="font-size:12.8px">•</span><span style="font-size:12.8px"> </span><span style="font-size:12.8px">UAVs </span><span style="font-size:12.8px">• GIS • GPS • osgEarth • Terrain • Telemetry • Cryptography • LIDAR • Embedded • Mobile • iPhone/iPad/iOS • Android</span></div><div style="text-align:center"><a href="https://twitter.com/alphapixel" target="_blank">@alphapixel</a> <a href="http://facebook.com/alphapixel" target="_blank">facebook.com/alphapixel</a> (775) 623-PIXL [7495]<br></div></div></div></div></div></div>