Game Development Community

How to protect *hlsl files

by Ivan Mandzhukov · in Torque Game Engine Advanced · 11/02/2007 (12:09 pm) · 8 replies

Is there a packer for hlsl files . As DSO are generated for cs files , is there any possibility to generate encrypted files for hlsl files?

#1
11/03/2007 (9:48 am)
Just encrypt them using the CypherLib (TGB resource sadly) or AESStream and to use them just load them using the same approach again.

and DSO is not an encrypted CS. Its a binary compile of it.
#2
11/17/2007 (10:18 am)
Ok, i tried but also have compilation errors/warnings
it isn't exlained very well how to integrate CypherLib
#3
11/17/2007 (10:41 am)
CypherLib will not work out of the box with it. Its for resources (although that needs tinkering for TGEA resources as it was meant for GBitmap only. We have it integrated but please don't ask me for the steps, it was 2 week spare time tinkering months ago ...) not for regular streams.

for that reason the integration might be more complex if you want to use it for a regular stream which is no resource (HLSL or DDS)

I mainly pointed it out as a base you can implement your own encryption basing on.
There is no "drop in" resource I fear.
#4
11/18/2007 (1:24 am)
Thanks for the advice
i'll wait a new version of TGEA with an integrated packer ( i hope in near future).
#5
11/18/2007 (2:53 am)
Will not happen. Torque 2 went into heavy development, TGEA is still waiting to have its advertised feature list finished 9 months past release with a most likely seriously cut down staff.

If you don't want to spend the time to integrate a solution yourself, spend 99Euro on Molebox Pro
#6
11/18/2007 (9:05 am)
Molebox Pro is working very well, i just tried the demo (15 days period), standart version also does job well done, 60 Euro is cheap for a commersial product.

Thank you, very good advice.
#7
11/18/2007 (12:25 pm)
Something else to consider is just to precompile your hlsl files to assembly and ship with those. With PIX, you can see the shaders of any program pretty easily, so it'd be smarter to spend energy on other parts of your project.
#8
11/19/2007 (7:15 am)
OK,
how to compile HLSL to Asembly and how Torque loads compiled shaders ?
I also think packing is not e great deal, there are a lot of unpacking software.
With a good debugger (and skills) like Olly or Softice is pretty easy to see a lot of things (on CPU).