Special shader if overbrightbits = 0 or 1?

Discussion for Level editing, modeling, programming, or any of the other technical aspects of Quake
Post Reply
User avatar
Hipshot
Posts: 1547
Joined: Sun Jan 20, 2002 8:00 am

Special shader if overbrightbits = 0 or 1?

Post by Hipshot »

Does anyone know if there's some way to have a surface use a different shader if you use r_overbrightbits 0 instead of 1?
That is one stupid setting...
Q3Map2 2516 -> http://www.zfight.com/misc/files/q3/q3map_2.5.16_win32_x86.zip
Q3Map2 FS_20g -> http://www.zfight.com/misc/files/q3/q3map2_fs_20g.rar
GtkRadiant 140 -> http://www.zfight.com/misc/files/q3/GtkRadiantSetup-1.4.0-Q3RTCWET.exe
Noruen
Posts: 308
Joined: Thu Jan 28, 2010 11:45 pm

Re: Special shader if overbrightbits = 0 or 1?

Post by Noruen »

I suspect that not :(
User avatar
Hipshot
Posts: 1547
Joined: Sun Jan 20, 2002 8:00 am

Re: Special shader if overbrightbits = 0 or 1?

Post by Hipshot »

I'm asking just to safe myself really...
Cause I suspect that most people use overbrights 1, since it's default (winmode = 0).

But since it looks so damn bad with 0 on this shader, it's annoying that someone will see it as that.

I know sock uses 0, at least most of his screens are shot in 0.

(Edit: I actually don't know what Sock uses, I suspect... )
Last edited by Hipshot on Sun Mar 06, 2011 1:23 pm, edited 1 time in total.
Q3Map2 2516 -> http://www.zfight.com/misc/files/q3/q3map_2.5.16_win32_x86.zip
Q3Map2 FS_20g -> http://www.zfight.com/misc/files/q3/q3map2_fs_20g.rar
GtkRadiant 140 -> http://www.zfight.com/misc/files/q3/GtkRadiantSetup-1.4.0-Q3RTCWET.exe
Noruen
Posts: 308
Joined: Thu Jan 28, 2010 11:45 pm

Re: Special shader if overbrightbits = 0 or 1?

Post by Noruen »

Really? I hate how maps look without overbrightened textures probably as you I even count with this feature in texturing. But I don't know ANY command in texture script which is really dependent on game setup (except picmap, lightmap, ...; but nothing what can change the texture). Maybe Obsidian - The Encyclopedy would know :)
^misantropia^
Posts: 4022
Joined: Sat Mar 12, 2005 6:24 pm

Re: Special shader if overbrightbits = 0 or 1?

Post by ^misantropia^ »

Hipshot wrote:Does anyone know if there's some way to have a surface use a different shader if you use r_overbrightbits 0 instead of 1?
There isn't one. It could be added to ioquake3 but that doesn't help you with stock Q3.
User avatar
Hipshot
Posts: 1547
Joined: Sun Jan 20, 2002 8:00 am

Re: Special shader if overbrightbits = 0 or 1?

Post by Hipshot »

Thought so.
Q3Map2 2516 -> http://www.zfight.com/misc/files/q3/q3map_2.5.16_win32_x86.zip
Q3Map2 FS_20g -> http://www.zfight.com/misc/files/q3/q3map2_fs_20g.rar
GtkRadiant 140 -> http://www.zfight.com/misc/files/q3/GtkRadiantSetup-1.4.0-Q3RTCWET.exe
$NulL
Posts: 100
Joined: Wed Mar 27, 2002 8:00 am

Re: Special shader if overbrightbits = 0 or 1?

Post by $NulL »

You can usually get a shader to look similar between obb 0 and obb 1 by setting the rgbgen stage parameter. Try identity or const ( 0.5 0.5 0.5 ) in the troublesome stage(s) to force the vertex colours to be equal in both obb0 and obb 1.

I refer you to the rgbgen section of the shader manual which discusses the default vertex colour behavior in obb 0 & 1:
http://www.heppler.com/shader/shader/section6.htm#6.3

And to this thread where setting rgbgen to const ( 0.5 0.5 0.5 ) fixed a problem similar to the one you mention:
http://forums.urbanterror.info/topic/36 ... -problems/
(unfortunately the images have been lost in time )
User avatar
Hipshot
Posts: 1547
Joined: Sun Jan 20, 2002 8:00 am

Re: Special shader if overbrightbits = 0 or 1?

Post by Hipshot »

Problem is that I already use const to create the color of the sprite. I do that to be able to color it w/o it being affected by discoloration when using rgbgen vertex... like a dark bottom or some sides being darker than others...
Q3Map2 2516 -> http://www.zfight.com/misc/files/q3/q3map_2.5.16_win32_x86.zip
Q3Map2 FS_20g -> http://www.zfight.com/misc/files/q3/q3map2_fs_20g.rar
GtkRadiant 140 -> http://www.zfight.com/misc/files/q3/GtkRadiantSetup-1.4.0-Q3RTCWET.exe
obsidian
Posts: 10970
Joined: Mon Feb 04, 2002 8:00 am

Re: Special shader if overbrightbits = 0 or 1?

Post by obsidian »

Late to the party, but yes what these guys said ^, obb1 does cut your colour range in half but allows you to artificially increase light ranges. There's nothing in the shader that is toggle-able with regards to obb.

What exactly are you having problems with? Is the lighting not consistent between obb0/obb1? Is this for brushes, patches, models? Different rgbGen values might help, but what you do differs on what kind of surface it is being applied to and what you want to achieve.
[size=85][url=http://gtkradiant.com]GtkRadiant[/url] | [url=http://q3map2.robotrenegade.com]Q3Map2[/url] | [url=http://q3map2.robotrenegade.com/docs/shader_manual/]Shader Manual[/url][/size]
Post Reply