Page 1 of 1

Shader programming and advanced effects

Posted: Fri Nov 23, 2007 9:52 am
by karx11erx
Technically D2X-XL (and I) are far enough to implement shader controlled full screen effects like e.g. a screen distortion when firing the Fusion gun.

I have gotten the hang of shader programming and know a few things to regard there (like how shader output is being processed by the graphics card), and I can render into some arbitrary texture instead of directly to the screen buffer, allowing me to post process the rendering result before outputting it to screen.

Btw, don't forget to read my worklog, I have posted some interesting (well, for me :P) articles there (probably going way over your heads :mrgreen: Not (only :roll: ) because I am so smart, because I have been digging into that stuff for years now).

Don't beat me, that's my sense of humor (I know I know, only my brother understands it, and even he doesn't everytime)! :away:

Posted: Fri Nov 23, 2007 10:16 am
by MetalBeast
It sounds great, but I have one request to you.

If you are going to implement a shader-functions for textures, just make it possible to write shader-scripts like in Q3/D3/HL2 engines. It is most comfortable possibility for modders to make shaders for their own maps.

Also you can change shader for the most textures without recompiling/editing the level.

Posted: Fri Nov 23, 2007 11:35 am
by karx11erx
Shader functions for textures? Do you want to start coding in GLSL, probably w/o even knowing where and how D2X-XL uses them? :think:

Ich habe glaube ich was anderes gemeint. Normalerweise landet alles, was OpenGL zeichnet, direkt in einem mit dem Bildschirm verknüpften Speicherbereich. Du kannst aber auch eine Textur anlegen (das geschieht im OpenGL-Treiber und bedeutet nur, dass man einen Speicherbereich gewisser Grösse mit bestimmten Eigenschaften reserviert) und OpenGL sagen "zeichne da rein". Da es für OpenGL eine normale Textur ist, kannst Du sie hinterher wieder in anderen Zeichenoperationen verwenden und dabei natürlich auch modifizieren, z.B. mit einem Shader-Programm (ich schreibe bewusst nicht "Pixel Shader", da ein Shader-Programm immer aus einem Vertex- und einem Pixel- (besser: Fragment-) Shader besteht).

Die Kameras in D2X-XL arbeiten z.B. so: Die Szenerie wird schlicht aus Sicht der Kamera in eine Textur gezeichnet und diese Textur wird dann auf die der Kamera zugeordnete Fläche des Levels aufgebracht.

Posted: Fri Nov 23, 2007 12:04 pm
by MetalBeast
ok, I did misunderstand this ;)

Posted: Fri Nov 23, 2007 12:05 pm
by karx11erx
Kam mir auch so vor. :)

Posted: Fri Nov 23, 2007 12:58 pm
by -JoFFa-
At last. If its going to be as you describe it - i think finally i get to create a nod of beauty like in say Quake 4...Can i offer my skills of an architect and artist for a position of a lead designer?

Posted: Fri Nov 23, 2007 1:03 pm
by Aus-RED-5
How can you offer anything when you haven't even finished the pyro you were working on?

Finish that or give it up for d/l and maybe we'll (Diedel) think about it. j/k ;) :P :P

Posted: Fri Nov 23, 2007 1:32 pm
by karx11erx
Aus-RED-5 wrote:How can you offer anything when you haven't even finished the pyro you were working on?

Finish that or give it up for d/l and maybe we'll (Diedel) think about it. j/k ;) :P :P


X2 :lolol:

Posted: Fri Nov 23, 2007 1:36 pm
by Aus-RED-5
deep down you know we really mean it..... :P

Re: Shader programming and advanced effects

Posted: Sat Nov 24, 2007 11:21 pm
by epsy
karx11erx wrote:Technically D2X-XL (and I) are far enough to implement shader controlled full screen effects like e.g. a screen distortion when firing the Fusion gun.
microwave-style canon (in MP)?
wobbling robots before death instead of just rolling with explosions(kind of a sick effect)? :mrgreen:

Posted: Sun Nov 25, 2007 12:00 am
by karx11erx
You can do almost anything with shader programs. Think of the big strider gun screen distortion effect.