Files |  Tutorials |  Articles |  Links |  Home |  Team |  Forum |  Wiki |  Impressum

Aktuelle Zeit: Mo Mai 20, 2024 11:06

Foren-Übersicht » Programmierung » Shader
Unbeantwortete Themen | Aktive Themen



Ein neues Thema erstellen Auf das Thema antworten  [ 11 Beiträge ] 
Autor Nachricht
 Betreff des Beitrags: compiled glsl?
BeitragVerfasst: Sa Jan 07, 2006 18:29 
Offline
DGL Member
Benutzeravatar

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?

_________________
http://3das.noeska.com - create adventure games without programming


Nach oben
 Profil  
Mit Zitat antworten  
 Betreff des Beitrags:
BeitragVerfasst: Sa Jan 07, 2006 21:06 
Offline
DGL Member

Registriert: Di Sep 06, 2005 20:40
Beiträge: 26
Wohnort: Aarhus, Denmark
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:


Nach oben
 Profil  
Mit Zitat antworten  
 Betreff des Beitrags:
BeitragVerfasst: So Jan 08, 2006 01:35 
Offline
DGL Member
Benutzeravatar

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.

_________________
www.extrawurst.org


Nach oben
 Profil  
Mit Zitat antworten  
 Betreff des Beitrags:
BeitragVerfasst: Mo Jan 09, 2006 13:05 
Offline
DGL Member

Registriert: Di Sep 06, 2005 20:40
Beiträge: 26
Wohnort: Aarhus, Denmark
you could ofcourse also just save it in binary form(eg blockwrite, blockread)


Nach oben
 Profil  
Mit Zitat antworten  
 Betreff des Beitrags:
BeitragVerfasst: Mo Jan 09, 2006 14:31 
Offline
DGL Member
Benutzeravatar

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.

_________________
www.extrawurst.org


Nach oben
 Profil  
Mit Zitat antworten  
 Betreff des Beitrags:
BeitragVerfasst: Mo Jan 09, 2006 18:24 
Offline
DGL Member

Registriert: Di Sep 06, 2005 20:40
Beiträge: 26
Wohnort: Aarhus, Denmark
oh i see.. forgot each char was a byte in one moment of coffee extase.. :P please, op, don't read my last post!


Nach oben
 Profil  
Mit Zitat antworten  
 Betreff des Beitrags:
BeitragVerfasst: Mo Jan 09, 2006 20:26 
Offline
DGL Member
Benutzeravatar

Registriert: Sa Dez 28, 2002 11:13
Beiträge: 2244
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.


Nach oben
 Profil  
Mit Zitat antworten  
 Betreff des Beitrags:
BeitragVerfasst: Mo Jan 09, 2006 23:58 
Offline
DGL Member
Benutzeravatar

Registriert: Do Mär 06, 2003 15:27
Beiträge: 281
Wohnort: Bochum
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... ;(

_________________
www.extrawurst.org


Nach oben
 Profil  
Mit Zitat antworten  
 Betreff des Beitrags:
BeitragVerfasst: Di Jan 10, 2006 00:05 
Offline
DGL Member
Benutzeravatar

Registriert: Sa Dez 28, 2002 11:13
Beiträge: 2244
It outputs glsl, the compiled ARB** programs and the infolog. It is enabled in the driver so it should work with all games.


Nach oben
 Profil  
Mit Zitat antworten  
 Betreff des Beitrags:
BeitragVerfasst: Di Jan 10, 2006 00:12 
Offline
DGL Member
Benutzeravatar

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.

_________________
www.SaschaWillems.de | GitHub | Twitter | GPU Datenbanken (Vulkan, GL, GLES)


Nach oben
 Profil  
Mit Zitat antworten  
 Betreff des Beitrags:
BeitragVerfasst: Fr Jan 18, 2008 21:06 
Offline
DGL Member
Benutzeravatar

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.

_________________
http://3das.noeska.com - create adventure games without programming


Nach oben
 Profil  
Mit Zitat antworten  
Beiträge der letzten Zeit anzeigen:  Sortiere nach  
Ein neues Thema erstellen Auf das Thema antworten  [ 11 Beiträge ] 
Foren-Übersicht » Programmierung » Shader


Wer ist online?

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.

Suche nach:
Gehe zu:  
  Powered by phpBB® Forum Software © phpBB Group
Deutsche Übersetzung durch phpBB.de
[ Time : 0.008s | 14 Queries | GZIP : On ]