[gameprogrammer] Yet another contract

  • From: Kevin Jenkins <gameprogrammer@xxxxxxxxxx>
  • To: gameprogrammer@xxxxxxxxxxxxx
  • Date: Thu, 17 Sep 2009 21:06:21 -0700

In RakNet, I'm working on a new product where a server gets RGBA screenshots from clients in realtime. The server then uses jpeglib to compress this into jpeg. This is fine, but works too slow (20 milliseconds).


I was looking at this page, and at the very end it references a real time shader
http://code.google.com/p/nvidia-texture-tools/wiki/RealTimeDXTCompression

Shader is here:
http://developer.download.nvidia.com/SDK/10/opengl/samples.html#compress_YCoCgDXT

I tried it out and it ran in only 2 milliseconds, which is great and fast enough for me.

The problem I'm having is that I'm too unfamiliar with running cg shaders to integrate the shader into my application in the amount of time I want to spend on it.

What I'd like is for someone experienced with this stuff to take the shader and make a class that can load it, along with other necessary initialization work. The most important part to me is a function to replace jpeglib:

void DoDxtCompression(char *inputRGBA, int inputWidth, int inputPitch, int inputHeight, char **outputDxt1, int *outputLength);

So basically the job is

1. Copy out the shader from the nvidia download.
2. Create a console application that can run the shader, without a bunch of extra junk like the default sample has 3. Write the DoDxtCompression function where a given RGBA source is converted to a dxt1 file.

I don't care if it's OpenGL or DirectX, whatever is easier. I can provide an input RGBA source image if you need it. The code should be easy to copy/paste into my real application.

The only snag is you might have to convert the image input format in the shader, since the input is RGBA but the shader expects some wierd format Y0 something or other.

If you're interested, let me know your hourly rate and how long it would take.

Thanks



---------------------
To unsubscribe go to http://gameprogrammer.com/mailinglist.html


Other related posts:

  • » [gameprogrammer] Yet another contract - Kevin Jenkins