shader question

Post your skinning / modelling questions or answers here

Moderator: Moderators

User avatar
ViPER
General
Posts: 1058
Joined: Fri Jan 14, 2005 5:48 pm
Location: California
Contact:

shader question

Post 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?
Waylander76
Sergeant Major
Posts: 122
Joined: Wed Jun 01, 2005 10:03 am

Post 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
Ophisâ„¢
Colonel
Posts: 461
Joined: Sun Mar 12, 2006 2:30 pm
Location: England, Manchester
Contact:

Post 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.
Image[ Formerly Known As Snakeâ„¢ ]
User avatar
k47a
товарищ
Posts: 810
Joined: Fri Mar 25, 2005 1:19 pm

Post by k47a »

afaik it's custom first anyway, no matter if zzz or not. it can however bug w/o user in front...
Image
User avatar
ViPER
General
Posts: 1058
Joined: Fri Jan 14, 2005 5:48 pm
Location: California
Contact:

Post by ViPER »

Thanks, Can a shader be used to flip a tga. If so, How vertical flip?
jv_map
Site Admin
Posts: 6521
Joined: Tue Sep 03, 2002 2:53 pm
Location: The Netherlands
Contact:

Post by jv_map »

tcMod scale 1.0 -1.0
Image
User avatar
ViPER
General
Posts: 1058
Joined: Fri Jan 14, 2005 5:48 pm
Location: California
Contact:

Post 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
jv_map
Site Admin
Posts: 6521
Joined: Tue Sep 03, 2002 2:53 pm
Location: The Netherlands
Contact:

Post 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 :)
Image
User avatar
ViPER
General
Posts: 1058
Joined: Fri Jan 14, 2005 5:48 pm
Location: California
Contact:

Post 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??
User avatar
ViPER
General
Posts: 1058
Joined: Fri Jan 14, 2005 5:48 pm
Location: California
Contact:

Post by ViPER »

Anybody?
lizardkid
Windows Zealot
Posts: 3672
Joined: Fri Mar 19, 2004 7:16 pm
Location: Helena MT

Post by lizardkid »

if you're running at low texture qualities/filters then you get problems like that. i've never seen it...
Moderator

۞
Abyssus pro sapientia
Olympus pro Ignarus
۞

AND STUFF™ © 2006
Rookie One.pl
Site Admin
Posts: 2752
Joined: Fri Jan 31, 2003 7:49 pm
Location: Nowa Wies Tworoska, Poland
Contact:

Post by Rookie One.pl »

Neither have I.
Admin
Image
Image
Honour guide me.

here's my stuff - inequation.org | here's where I work - thefarm51.com
jv_map
Site Admin
Posts: 6521
Joined: Tue Sep 03, 2002 2:53 pm
Location: The Netherlands
Contact:

Post 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.
Image
Rookie One.pl
Site Admin
Posts: 2752
Joined: Fri Jan 31, 2003 7:49 pm
Location: Nowa Wies Tworoska, Poland
Contact:

Post 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. :)
Admin
Image
Image
Honour guide me.

here's my stuff - inequation.org | here's where I work - thefarm51.com
jv_map
Site Admin
Posts: 6521
Joined: Tue Sep 03, 2002 2:53 pm
Location: The Netherlands
Contact:

Post 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 :(
Image
Post Reply