lowdragon@Posted: Mon Jun 23, 2008 3:14 pm :
Hi, i like to have a "classic" shock moment for my map/mod/whatever which looks like here

Code:
http://www.devmex.com/temp/face/face01.html


if the flash movie does not work here a gif
Code:
http://www.devmex.com/temp/face/face01.gif


the effect, of course, is a lot faster.
First i changed the colorprocess.vfp which provides greyscale/blending, so i "just" need to invert the currentrender but there is obviously a hidden logic error ( he, obviously, hidden . pretty funny :) because i got it inverted or greyscale but not both :evil: - anyway, there must be an easier way with .mtr files.

Sorry, since iam not familiar working with materials - how do i supposed to make a textureShader which inverts + greyscales a texture.

just inverted :
Code:
textures/nightshift/invshock2
{
   noshadows
   noimpact
   sort   postProcess
   {
   rgba -1
   map _white
   blend gl_one_minus_dst_color, gl_zero
   }
}



thx for any help.



6th Venom@Posted: Mon Jun 23, 2008 4:10 pm :
RGBA -1 will not work, it's a 0 to 1 value only. :?

...i don't think it's possible with only vanilla D3 shaders, you must make your own vfp
If you know how to do that, i don't think it's the hardest effect to do.



pistonfan92@Posted: Mon Jun 23, 2008 8:22 pm :
THANKS ALOT GUYS FOR ALL YOUR HELP!!! i figured out. like i said it took me this long because im not always on the computer. im at work or hanging out. so thanks a TON!

now i just gotta figure out the textures : )



6th Venom@Posted: Mon Jun 23, 2008 8:49 pm :
Could you tell us (me) how you achieve that, please?

:D:?:



pistonfan92@Posted: Tue Jun 24, 2008 12:55 am :
how i achieve what. lol. u mean i i figured it out?



lowdragon@Posted: Tue Jun 24, 2008 9:30 am :
Hmmm, i know that -1 wouldnt work :wink: just added to show how it looks like. :)

However (default d3 vfp are working fine), even if i just changed a single line the postprocess doesnt fit in the "renderwindow" anymore.

see wrongscale plus by using AA the screen is flipped vertically. :oops:
Maybe its the use of g_testpostprocess ... i have to figure out myself.

PS : IF you would write in "big red letters" it would be just a little more offensive you know. :D



6th Venom@Posted: Tue Jun 24, 2008 4:16 pm :
lowdragon wrote:
PS : IF you would write in "big red letters" it would be just a little more offensive you know. :D

Who are you talking to, Pistonfan92 or me?

I'v learned something new about D3 today, RGBA -1 works! :D
(and so, red, blue, green, alpha and color do?)



pistonfan92@Posted: Tue Jun 24, 2008 4:31 pm :
yeah i have no clue what hes talking about hahahaha



pistonfan92@Posted: Tue Jun 24, 2008 5:05 pm :
last but not least. another question. how would i post my modes online. is there a website?



lowdragon@Posted: Tue Jun 24, 2008 5:10 pm :
may you misunderstood your question :twisted:



pistonfan92@Posted: Tue Jun 24, 2008 6:05 pm :
um. that statement didn't make sense. anybody else? :D



rebb@Posted: Tue Jun 24, 2008 6:12 pm :
For some reason i think that pistonfan is trying to reply to another thread ;).



lowdragon@Posted: Tue Jun 24, 2008 7:01 pm :
i guess it is chatting with itself :arrow:



lowdragon@Posted: Fri Jul 11, 2008 11:40 pm :
That was kind of solved - replace scrblur.vfp with colorprocess.vfp and use like other influance materials (see decals/bloodyfilmred).

Code:
textures/nightshift/invshock
{
   noshadows
   translucent

   qer_editorimage      textures/decals/greystatica.tga
   {
   vertexProgram    scrblur.vfp
   vertexParm       0    1.5         //weightingX
   vertexParm       1    1.375         //weightingY
   vertexParm       2    1.2, 1.2, 1.2   //target full intensity RGB
   fragmentProgram    scrblur.vfp

   fragmentMap    0   _currentRender
   fragmentMap    1   _currentRender
   }
   {
   blend add
   scale 2,2
   translate time * staticatable[ time * 10 ], time *staticatable[ time * 10 ]
   rotate time * 7
   map    textures/decals/greystatica.tga
   }
   {
   blend filter
   scale 2,2
   translate time * staticatable[ time * 20 ],time * staticatable[ time * 20 ]
   rotate time * 6
   map    textures/decals/oldfilm.tga
   }
   {
   blend filter
   scale 1, .007
   translate time * 0, time * -40
   map    textures/decals/oldfilm3.tga
   }
// invert_colorise
   {
   blend gl_one_minus_dst_color, gl_zero
   map    _white
   red    Parm0 * .6
   green Parm1 * .45
   blue    Parm2 * .35
   }
}


have fun :)



lowdragon@Posted: Mon Jun 23, 2008 3:14 pm :
Hi, i like to have a "classic" shock moment for my map/mod/whatever which looks like here

Code:
http://www.devmex.com/temp/face/face01.html


if the flash movie does not work here a gif
Code:
http://www.devmex.com/temp/face/face01.gif


the effect, of course, is a lot faster.
First i changed the colorprocess.vfp which provides greyscale/blending, so i "just" need to invert the currentrender but there is obviously a hidden logic error ( he, obviously, hidden . pretty funny :) because i got it inverted or greyscale but not both :evil: - anyway, there must be an easier way with .mtr files.

Sorry, since iam not familiar working with materials - how do i supposed to make a textureShader which inverts + greyscales a texture.

just inverted :
Code:
textures/nightshift/invshock2
{
   noshadows
   noimpact
   sort   postProcess
   {
   rgba -1
   map _white
   blend gl_one_minus_dst_color, gl_zero
   }
}



thx for any help.



6th Venom@Posted: Mon Jun 23, 2008 4:10 pm :
RGBA -1 will not work, it's a 0 to 1 value only. :?

...i don't think it's possible with only vanilla D3 shaders, you must make your own vfp
If you know how to do that, i don't think it's the hardest effect to do.



pistonfan92@Posted: Mon Jun 23, 2008 8:22 pm :
THANKS ALOT GUYS FOR ALL YOUR HELP!!! i figured out. like i said it took me this long because im not always on the computer. im at work or hanging out. so thanks a TON!

now i just gotta figure out the textures : )



6th Venom@Posted: Mon Jun 23, 2008 8:49 pm :
Could you tell us (me) how you achieve that, please?

:D:?:



pistonfan92@Posted: Tue Jun 24, 2008 12:55 am :
how i achieve what. lol. u mean i i figured it out?



lowdragon@Posted: Tue Jun 24, 2008 9:30 am :
Hmmm, i know that -1 wouldnt work :wink: just added to show how it looks like. :)

However (default d3 vfp are working fine), even if i just changed a single line the postprocess doesnt fit in the "renderwindow" anymore.

see wrongscale plus by using AA the screen is flipped vertically. :oops:
Maybe its the use of g_testpostprocess ... i have to figure out myself.

PS : IF you would write in "big red letters" it would be just a little more offensive you know. :D



6th Venom@Posted: Tue Jun 24, 2008 4:16 pm :
lowdragon wrote:
PS : IF you would write in "big red letters" it would be just a little more offensive you know. :D

Who are you talking to, Pistonfan92 or me?

I'v learned something new about D3 today, RGBA -1 works! :D
(and so, red, blue, green, alpha and color do?)



pistonfan92@Posted: Tue Jun 24, 2008 4:31 pm :
yeah i have no clue what hes talking about hahahaha



pistonfan92@Posted: Tue Jun 24, 2008 5:05 pm :
last but not least. another question. how would i post my modes online. is there a website?



lowdragon@Posted: Tue Jun 24, 2008 5:10 pm :
may you misunderstood your question :twisted:



pistonfan92@Posted: Tue Jun 24, 2008 6:05 pm :
um. that statement didn't make sense. anybody else? :D



rebb@Posted: Tue Jun 24, 2008 6:12 pm :
For some reason i think that pistonfan is trying to reply to another thread ;).



lowdragon@Posted: Tue Jun 24, 2008 7:01 pm :
i guess it is chatting with itself :arrow:



lowdragon@Posted: Fri Jul 11, 2008 11:40 pm :
That was kind of solved - replace scrblur.vfp with colorprocess.vfp and use like other influance materials (see decals/bloodyfilmred).

Code:
textures/nightshift/invshock
{
   noshadows
   translucent

   qer_editorimage      textures/decals/greystatica.tga
   {
   vertexProgram    scrblur.vfp
   vertexParm       0    1.5         //weightingX
   vertexParm       1    1.375         //weightingY
   vertexParm       2    1.2, 1.2, 1.2   //target full intensity RGB
   fragmentProgram    scrblur.vfp

   fragmentMap    0   _currentRender
   fragmentMap    1   _currentRender
   }
   {
   blend add
   scale 2,2
   translate time * staticatable[ time * 10 ], time *staticatable[ time * 10 ]
   rotate time * 7
   map    textures/decals/greystatica.tga
   }
   {
   blend filter
   scale 2,2
   translate time * staticatable[ time * 20 ],time * staticatable[ time * 20 ]
   rotate time * 6
   map    textures/decals/oldfilm.tga
   }
   {
   blend filter
   scale 1, .007
   translate time * 0, time * -40
   map    textures/decals/oldfilm3.tga
   }
// invert_colorise
   {
   blend gl_one_minus_dst_color, gl_zero
   map    _white
   red    Parm0 * .6
   green Parm1 * .45
   blue    Parm2 * .35
   }
}


have fun :)