DGL
https://delphigl.com/forum/

compiled glsl?
https://delphigl.com/forum/viewtopic.php?f=20&t=5049
Seite 1 von 1

Autor:  noeska [ Sa Jan 07, 2006 18:29 ]
Betreff des Beitrags:  compiled glsl?

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?

Autor:  JSoftware [ Sa Jan 07, 2006 21:06 ]
Betreff des Beitrags: 

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 :P

i'm just using the xor trick for my shader files :wink:

Autor:  Extrawurst [ So Jan 08, 2006 01:35 ]
Betreff des Beitrags: 

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.

Autor:  JSoftware [ Mo Jan 09, 2006 13:05 ]
Betreff des Beitrags: 

you could ofcourse also just save it in binary form(eg blockwrite, blockread)

Autor:  Extrawurst [ Mo Jan 09, 2006 14:31 ]
Betreff des Beitrags: 

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.

Autor:  JSoftware [ Mo Jan 09, 2006 18:24 ]
Betreff des Beitrags: 

oh i see.. forgot each char was a byte in one moment of coffee extase.. :P please, op, don't read my last post!

Autor:  LarsMiddendorf [ Mo Jan 09, 2006 20:26 ]
Betreff des Beitrags: 

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.

Autor:  Extrawurst [ Mo Jan 09, 2006 23:58 ]
Betreff des Beitrags: 

does that work with every glsl shader ? even the ones used in real games ? does it output glsl or assembler ? i didn't knew that before... ;(

Autor:  LarsMiddendorf [ Di Jan 10, 2006 00:05 ]
Betreff des Beitrags: 

It outputs glsl, the compiled ARB** programs and the infolog. It is enabled in the driver so it should work with all games.

Autor:  Sascha Willems [ Di Jan 10, 2006 00:12 ]
Betreff des Beitrags: 

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.

Autor:  noeska [ Fr Jan 18, 2008 21:06 ]
Betreff des Beitrags: 

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.

Seite 1 von 1 Alle Zeiten sind UTC + 1 Stunde
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/