|
![](/i/fill.gif) |
> Nice to see, that someone is playing with shaders and creating such
> beautiful pictures!
tnx
> I took a look to your shader and I must admit, that I don't understand
> its semantics at all (as I've never learned Flemish? ;o) But I looked at
> it from syntax viewpoint and may I propose couple of improvement
> suggestions?
well, I'm sure it could be improved a lot :)
> I noted, that you created help function intercol() to mix 2 colors, but
> shading language has built-in function mix() with same functionality.
hmmm, not really a surprise :) I assumed there was such a function, but
finding the name would have taken me more time than just make it myself :)
> Using it instead of user-function will save couple of commands.
> You calculate value of opac from dot production of normalized normal and
> incident vectors, later you calculate normalized normal vector again
> and store it in variable Norm. By moving this before opac calculation,
> you can save one vector normalization.
> I'm not sure, what is meaning of variable teken? Will it hold sign of
> cosinus? In this case it would be much more effective to use built-in
> sign function (note, that sign returns 0, if argument is 0, but in
> current case it does not matter, as value of ruis4 should remain same).
you see, I don't know the names of the build-in function, so instead of
searching for them, I just made my own functions out of my limited knowledge
of the shader-language :)
> There is couple of variables, which values are calculated, but never
> used. Better would be to comment them out, if you don't want to delete
> them. Unfortunately SL compiler is not so smart, that it could throw
> such unnecessary statements away...
I'll delete them.
> Sorry to be so critic, but as my measurments have shown, shader
> execution takes great deal of rendering time and every optimization
> there is welcome.
uhm, why sorry? They're helpfull comments! tnx! :)
> However, this shader is quite nice and I'd like to add it to shader
> examples section in my homepage (with your permission, of course). And
uhm, not yet please. There is a bug in: the 'transparantie'-variable
doesn't work as it should. I'll add the improvements you suggested and fix
that problem. Once that's done (might be later this night) I'd be happy to
let you put it on your site.
> I'd like to put your contact information (name and e-mail address) there
> as well. This would be of course only in case, if you don't have
> nothing against it (some people don't want to put e-mail addresses in
> web pages to avoid spam). So please reply here or send me mail, if you
> agree with it.
Spamming might be a problem indeed. If you do this, maybe you should use my
other email-adres: zeg### [at] yahoo com
So, I'll work on it now :)
cu!
--
ZK AKA SaD
http://www.povplace.be.tf
"Luckyly they included a button, right here, that'll blow the entire thing
up!"
Post a reply to this message
|
![](/i/fill.gif) |