Pages: [1]
  Print  
Author Topic: Should I fix rgbGen const?  (Read 4105 times)
fromhell
Administrator
GET A LIFE!
**********

Cakes 31
Posts: 14479



WWW
« on: November 21, 2015, 07:25:02 pm »

rgbGen const is a shader command that can apply a particular constant RGB color for a shader stage.  Useful for say, coloring a generic gray explosion or flare to a specific color to save on texture usage. Could also be useful for all those light shafts in maps.

However the issue here is that it doesn't shift this color down for overbright bit compensation so it'll be brighter than it should be compared to the rest of the world.


Is there anything i'll break out there if I fix this?
Logged

asking when OA3 will be done won't get OA3 done.
Progress of OA3 currently occurs behind closed doors alone

I do not provide technical support either.

new code development on github
andrewj
Member


Cakes 23
Posts: 571



« Reply #1 on: November 21, 2015, 08:43:49 pm »

I think your example -- colorizing an existing texture or sprite -- will break since the texture will be compensated for overbright bits already.

So you would need to check the shader stages -- that may be hairy to get right, but I think it is a good idea to handle the single stage case where that stage is rgbGen const (or two stages and one is just lightmap).
« Last Edit: November 21, 2015, 08:50:43 pm by andrewj » Logged
Gig
In the year 3000
***

Cakes 48
Posts: 4237


WWW
« Reply #2 on: November 23, 2015, 02:32:36 am »

First, I have to specify I have understood more or less nothing about overbrightbits in general (apart that there is some user option to tweak that and that may change visibility of some shaders, maybe prone to be used for getting unfair advantage over other players)...

So, speaking in general, one may suppose that who has used a specific shader may have already used textures appositely made to work well with it, so there should not be need to modify shader behavior. But, in case of shaders which look like very different depending from user settings (e.g. terrain blending shaders which are really not friendly with vertex light mode), that's a different thing (one may suppose the mapper made the shader/texture look well with most commonly used settings, but there is no guarantee).

I see you are working on adding new shader commands in OA3 (http://openarena.wikia.com/wiki/New_shader_commands), so you may create a new shader command which would work as a "fixed" rbggen const, leaving the original one unchanged (in that case, it would show its effects only with new OA3 maps made by people who will know about the new OA3 shader commands)... or you may fix the original one and add a new one which would work like the original one did (just in case someone feels its lack... maybe that may be a bit confusing?).

I don't know what to tell you, sorry... :-/

« Last Edit: November 23, 2015, 02:36:21 am by Gig » Logged

I never want to be aggressive, offensive or ironic with my posts. If you find something offending in my posts, read them again searching for a different mood there. If you still see something bad with them, please ask me infos. I can be wrong at times, but I never want to upset anyone.
Pages: [1]
  Print  
 
Jump to: