Page 1 of 2

shader question

Posted: Thu Jun 22, 2006 9:18 pm
by ViPER
if you modify a shader component that is located in a stock shader. Will the new mod shader update that one part to amend to other stock components in that shader or will the mod shader overwrite all previous shaders of same name?

Posted: Fri Jun 23, 2006 6:08 pm
by Waylander76
if it's in a separate pk3 with your map and other shaders then I think it
will overwrite the old shader if it has the same name.

It has something to do with the way the game loads the PK3 files.
It loads them in alphabetical order, so if your pk3 is called zzz_user_my_pk3.pk3 it gets loaded after the main game pk3's so your
shader will overwrite the original.

I could be wrong on this but that's how I understand it and will stand corrected by the more knowledgable members who reside here! :D

Posted: Fri Jun 23, 2006 7:25 pm
by Ophisâ„¢
i always made my pk3's start with "zzz" becuase they would stay at the bottom for the user to delete/find/move easyer amoung other pk3's. But, if its for the above reason too, and i didnt know, kool.

Posted: Fri Jun 23, 2006 7:54 pm
by k47a
afaik it's custom first anyway, no matter if zzz or not. it can however bug w/o user in front...

Posted: Sat Jun 24, 2006 10:54 pm
by ViPER
Thanks, Can a shader be used to flip a tga. If so, How vertical flip?

Posted: Sun Jun 25, 2006 11:20 am
by jv_map
tcMod scale 1.0 -1.0

Posted: Mon Jun 26, 2006 12:08 am
by ViPER
thanks,


More problems though - here is what im trying to do-

Im trying to fix the shader error in the jh_foliage2 in Southernfrance "the glowing vine"

i tried turning off the lightmap to stop the error but the plant is - lol ofdcourse, very bright but not flickering - so i put in a darker tga and its upside down LOL. tried to flip it by editing the tga but the background turns black.

Fixed that with ^ command. Now the bottom of the tga is seen at the top as shown here -

Image

Can i rotate the pic up a little with the shader?


Or maybe there is a completley better way to fix this in the shader with the origianal tga?

Thanks again! : :D

Posted: Mon Jun 26, 2006 7:00 am
by jv_map
Could try to fit it with tcMod offset or tcMod stretch, but it's probably easier to use the original texture w/ a rgbGen const 0.7 0.7 0.7 or so to make it darker.

@ IvaN : pk3's are loaded alphabetically :)

Posted: Thu Jul 06, 2006 8:10 pm
by ViPER
Regarding the case of the flickering ivy in France - Can someone tell me what causes this ? I have my own shader fix now but im wondering if this is the best way to fix it?

Reason is Ive started to fix other maps with the same problem and noticed that the same shader and texture used in a different map may not have that error. So editing the shader may not be best.

in some custom maps where it is really bad, I have hex edited the bsp to point the shader and texture to new folders so im not effecting other maps. But im wondering if there is a better fix or if it is a client error maybe?

any suggestions or understanding what causes the flickering error??

Posted: Sat Jul 08, 2006 1:45 am
by ViPER
Anybody?

Posted: Sat Jul 08, 2006 4:48 am
by lizardkid
if you're running at low texture qualities/filters then you get problems like that. i've never seen it...

Posted: Sat Jul 08, 2006 1:34 pm
by Rookie One.pl
Neither have I.

Posted: Sun Jul 09, 2006 7:26 am
by jv_map
It's probably z-fighting.. it occurs when one textured face is located on or very closely before/after another textured face and are oriented (roughly) in the same direction. This problem can only be solved by:
  1. Increase the distance between both faces. This can be done by repositioning the decal (make a new dcl file) or add a polygonOffset to the shader if it isn't already there.
  2. Increase the color depth (32 bit instead of 16 bit). This can be set in video options. Any non-antique vid card will support 32 bit rendering :)
  3. Reduce what's called the view frustrum. You can increase the depth resolution of the renderer by:
    • Reducing the farplane distance (r_farplane or $world farplane).
    • Increasing the nearplane distance using r_znear. Unfortunately, this is a cheat so not a very viable option.

Posted: Sun Jul 09, 2006 8:10 am
by Rookie One.pl
There's no farplane involved in Southern France as far as I remember. ;) Heh, and that znear trick also has something to do with the camera positioning too, right? I remember I had to change it when we were testing the cockpits in skylimit. :)

Posted: Sun Jul 09, 2006 8:51 am
by jv_map
No it's merely an opengl setting :) but yah needed it for the fancy pits as the planes in skylimit are so bloody small :(