Registriert: Di Jul 01, 2003 18:59 Beiträge: 887 Wohnort: (The Netherlands)
Programmiersprache: fpc/delphi/java/c#
can a glsl script be distributed in a compiled form? Or should the source be distributed? How does one protect the source for an glsl script if it cannot be distributed in a compiled form?
i don't think you can store it in compiled form. you could however use a few measures to ensure no one steals it(or atleast making it a bit harder..). you could when you write the file xor each character with a constant integer. this would produce something unreadable. then you could shift the characters around. you could eventually store the file backwards after that or something weird like that
Registriert: Do Mär 06, 2003 15:27 Beiträge: 281 Wohnort: Bochum
i got a content-managing system in my actual engine wich is used for every external file that is used by the game. it stores all needed files in a archiv encodes it with some "simple" algorithms like described by JSoftware and pack(compresses) it then internally by using the z-lib library. that makes my glsl-files unreadable in the first place and compact too, wich is kind a cool by-product.
Registriert: Do Mär 06, 2003 15:27 Beiträge: 281 Wohnort: Bochum
as far as i know if u want to have a shader saved in binary form you have to convert the ascii-version one wrote to binary.Taht wld make a converter-program essential and from writing an own converter it is just near to build in some simple encoding or like in my case also compression.
If somebody wants to steal your shader code, all you have to do is to use NVEmulate and enable "Write Program Source" to write the shader code into a text file in the current directory.
Registriert: Mo Sep 23, 2002 19:27 Beiträge: 5812
Programmiersprache: C++
Whatever you do to hide GLSL shaders is pretty useless. Those people that want to see them have a variety of tools and possibilites. As Lars pointed out, there is this easy way of doing it on NVidia cards, but there are also tools like glIntercept or gDebugger, or one could easily write it's own wrapper OpenGL.DLL to save the shaders to a file.
Registriert: Di Jul 01, 2003 18:59 Beiträge: 887 Wohnort: (The Netherlands)
Programmiersprache: fpc/delphi/java/c#
Sorry to kick an old topic but i found an easy way of getting from glsl (and hlsl (directx shaders) and renderman shaders) to arb vertex and fragment shaders:
http://ati.amd.com/developer/ashli.html This does just wat i want and as a bonus i get to test and merge the shaders also.
Mitglieder in diesem Forum: 0 Mitglieder und 1 Gast
Du darfst keine neuen Themen in diesem Forum erstellen. Du darfst keine Antworten zu Themen in diesem Forum erstellen. Du darfst deine Beiträge in diesem Forum nicht ändern. Du darfst deine Beiträge in diesem Forum nicht löschen. Du darfst keine Dateianhänge in diesem Forum erstellen.