GarageGames / Torque3D

MIT Licensed Open Source version of Torque 3D from GarageGames
http://torque3d.org
MIT License
3.35k stars 1.2k forks source link

Post-process shader #864

Open raichu opened 9 years ago

raichu commented 9 years ago

I've spend the past 2 hours trying to figure out "how do I add my own post-process shader". I'm sorry but the documentation is nowhere near helpful (Not only in this particular topic, but in general., Pretty pretty please improve the documentation overall).

Could anyone tell me how? (I did try the forums, but the signal-to-noise ratio was not good enough)

It think it's also a good idea if you ship an example with the tree.

Also, it was quite hard to believe that there is no in-depth tutorial on using shaders. Seriously, this is essential. All I could find on the official guides was a link to some half-baked community guide by some random dude on the web, written in a language that is probably understandable to people who already know it.

It has been a painful 2 hours, and I'm exactly where I started (the difference is like day and night with Unity).

Please please add understandable self-contained guides & examples for people just starting off.

crabmusket commented 9 years ago

Hey @raichu, we're working on better documentation slowly but steadily. I've made a stub page on the wiki for this. Unfortunately I can't help out myself yet as I'm not knowledgable enough about shaders.

In the meantime, is this helpful at all? It's a small example of a working PostFx shader. I didn't write it myself, but all the elements you need are there (shader files, script file, call to enable()).

raichu commented 9 years ago

Glad to hear it!

I believe it will help to some extent, at least I can try to run and go through the code. Thanks so much for pointing that code out. That code it code DirectX though (HLSL), and I'm on Linux. At least I have better keywords to use with Google. Sigh.