How do you know what to do?

Posted By: Yulor

How do you know what to do? - 12/24/04 22:36

I've been reading countless tutorials, and I bought both ShaderX^2 novels by wolfgang engel, and I'm pretty sure I understand the syntax of HLSL, but how do you go about deciding what effect to make, and furthermore, how to achieve that effect? (by this I mean like, an algorithm. or psuedocode)

This is what I don't understand about shaders
Posted By: PHeMoX

Re: How do you know what to do? - 12/25/04 08:00

Well, obviously this is the hardest part of designing a shader.. You start with an idea for an effect usually, no matter how crazy it sounds, and then you should check the internet to see if you aren't re-inventing the wheel as for the method for the shader.... I know some guys who produced some very nice effects this way, but most of them are professionals and they won't even start explaining me (I don't blame them)...
I tend to fiddle a lot with programs like FX Composer, RenderMonkey etc. etc. just to look what changes what.. And off course read a lot about it ; though believe me I'm far from a shader pro....
Anyways as for shader making trully from scratch you've got to know all the ins and outs of 'everything' I guess, for example if you plan on making the multi-terrain shader instead of alpha-based, height-based, you'll have to either know or figure out how to get/calculate the heights of a vector/pixel and write some code which makes sure that (for example) the icy texture is only there on the terrain parts above a certain height... Off course before you can even start to think about shaders in this way, you should know something about socalled 'passes', the syntax (functions;what describes for example 'height', so the actual basic setup for a shader. It seems with the two books you've got, you should be able to figure most of that out.. When you have an idea, try to somehow debate with others about it, that happens a lot at these forums, and they will give their own ideas about it, maybe giving you something to start with....? I mean unless you start asking; "I want this shader please?!! NOW because I need it so bad and...." etc. everyone here would share their ideas, I'm pretty sure...

Cheers
Posted By: Yulor

Re: How do you know what to do? - 12/25/04 10:49

Aha, thanks for the tips! Yea, I've been reading these two books, and I am starting to understand the syntax, It's just this engel guy is a genius, and expects the reader to know like, everything about shaders, (except the stuff he is teaching of course), Which is why I'm wondering where everyone else is getting this knowledge and gusto for shaders.
Posted By: Whisper

Re: How do you know what to do? - 12/25/04 11:13

which shader books do you have i have one by tom miller,
if you like some of the lessons are on this disk, i'll be happy to put a link to the lesson if you're needing more info on shaders. merry ho ho to all.
Posted By: Matt_Aufderheide

Re: How do you know what to do? - 12/26/04 02:57

most useful shader effects have already been written.. just find examples of the effect you want and try to convert it over..The heavy duty optical theorizing is usually the domain of the PHDs who write papers -- then engineers develop workable implementations..for instance most of the theory that we now use for perpixel lighting was done by Phong and Blinn more than 20 years ago. It's instructive to go back to Phong's original paper on real-time lighting written many years ago.. and you will begin to understand the maths behind the optical approximations. Blinn is easier to understand than Phong tho..
© 2024 lite-C Forums