Talk:GtkRadiant/What Shaders can do

[21:31]	Xycaleth: i finally understand those blend funcs now :D [21:31]	Didz: same [21:31]	BlasTech: alphaGen identity [21:31]	Yzmo: I still dont.. [21:31]	Didz: try alphaGen const 1.0 [21:31]	Yzmo: Write a guide Xycaleth? [21:31]	BlasTech: Hmm, maybe. :D [21:32]	Xycaleth: i can try explaining it here if you want [21:32]	Yzmo: That'd be great too :) [21:32]	Xycaleth: the first one is the source function, second is the destination function [21:32]	Xycaleth: and you have an equation like... [21:32]	Xycaleth: final_color = source_color * source_func + dest_color * dest_func [21:32]	Didz sets mode +m [21:32]	Didz: colour* [21:32]	ChanServ sets mode -m [21:32]	Xycaleth: o.0 [21:33]	Xycaleth: you muppet [21:33]	Xycaleth: anyhow [21:33]	BlasTech: Same for me. I've actually explained GL_DST_COLOR GL_ONE_MINUS_SRC_ALPHA very thoroughly in the shaders of the latest effects. ;) [21:33]	Didz sets mode +m [21:33]	Didz: colour* [21:33]	ChanServ sets mode -m [21:33]	Didz: oops [21:33]	Didz: i'll turn that off [21:33]	Xycaleth: lol [21:33]	Didz: done [21:33]	Xycaleth: so source colour is what is already on the screen [21:33]	Yzmo: Okay [21:33]	Didz: other way around [21:33]	Xycaleth: eh..probably [21:33]	BlasTech: Actually I am working on realistic water. :D [21:33]	Xycaleth: destination colour is what is already on the screen [21:34]	Didz: destination is what is already on the screen [21:34]	BlasTech: Photosourced. :) [21:34]	Didz: nice [21:34]	Xycaleth: source colour is what you're going to be adding on to the screen with some sort of blended thing [21:34]	Xycaleth: if you have a destination function of GL_ONE, then the red/green/blue components of the destination function are multiplied by 1 [21:35]	Yzmo: aka nothing happens? [21:35]	BlasTech: Det kommer att vara StorsjÃ¶vatten i JKG. :P [21:35]	Xycaleth: yus [21:35]	Xycaleth: then, lets say i set the source function to be GL_ZERO [21:35]	Xycaleth: so the source colours are multiplied by 0 [21:35]	Yzmo: Jag bor I skåne BlasTech, har ingen aning hur storsjövatten ser ut [21:35]	BlasTech: Ã„sch. :P [21:35]	Xycaleth: and you just end up with the destination colours [21:36]	Xycaleth: everything make sense so far? :D [21:36]	Yzmo: okay.. But isnt x0 black? [21:36]	Xycaleth: ya [21:36]	Xycaleth: but you do src_color * src_func + dest_color * dest_func [21:36]	Yzmo: right, + [21:37]	Xycaleth: so, lets say you do something more interesting [21:37]	Xycaleth: like...destination function of it's alpha channel (GL_DST_ALPHA <-- does it even exist? o_O) [21:37]	BlasTech: Still not working. :( BTW, how to make the shader not affected by fog? o.o [21:38]	Xycaleth: no idea o.o [21:38]	Didz: i forgot [21:38]	Xycaleth: and then we have source function as (1 - it's own alpha channel) [21:38]	Didz: yes xyc, it exists afaik [21:38]	Xycaleth: which would be, GL_ONE_MINUS_SRC_ALPHA [21:38]	Xycaleth: in the end you have something like... [21:39]	Xycaleth: final_color = src_color * src_alpha + dest_color * (1 - dest_alpha) [21:39]	Yzmo: ah [21:39]	Xycaleth: which blends it in some way (i don't know what :D)