Gamestudio Links
Zorro Links
Newest Posts
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
0 registered members (), 1,103 guests, and 1 spider.
Key: Admin, Global Mod, Mod
Newest Members
Hanky27, firatv, wandaluciaia, Mega_Rod, EternallyCurious
19051 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Colour invert #52814
08/21/05 02:03
08/21/05 02:03
Joined: Nov 2004
Posts: 595
127.0.0.1
K
KoH Offline OP
Developer
KoH  Offline OP
Developer
K

Joined: Nov 2004
Posts: 595
127.0.0.1
Is there a way of inverting all the colours on the screen?


I am no longer a member of these boards.
Re: Colour invert [Re: KoH] #52815
08/21/05 03:19
08/21/05 03:19
Joined: Oct 2003
Posts: 4,131
M
Matt_Aufderheide Offline
Expert
Matt_Aufderheide  Offline
Expert
M

Joined: Oct 2003
Posts: 4,131
if you have Pro you can render the camrea view to texture, map it on a screen aligned quad, and use a simple pixel shader like:

float4 color=tex2d(entSkin1,tex.xy);
return 1-color;

this ought to do what you want.

or if you dont have Pro you can assign a material like this to every model and level texture.. and then have some variable that toggles between normal and inverted.

Re: Colour invert [Re: Matt_Aufderheide] #52816
08/21/05 03:38
08/21/05 03:38

A
Anonymous
Unregistered
Anonymous
Unregistered
A



I can color shift through the rainbow on panels with a formula. But getting a bmap from the screen and putting onto a panel takes a long time and the colorshifting one is also fairly slow. If you're wandering how to shift hue (colors through the rainbow) with a single number, colorvar going from 0 to 360 in this example, here's the formula:
my.red=125+fcos(colorvar,125);
my.green=125+fcos(colorvar-120,125);
my.blue=125+fcos(colorvar-240,125);

as you can see, the green and blue are simply shifted to the right 120 and 240 degrees making each of the colors equally spaced out for a smooth rainbow transition. You can probably do this with the gamma ramp dll posted by Lion_ts recently.

Re: Colour invert [Re: ] #52817
08/22/05 15:51
08/22/05 15:51
Joined: Jul 2002
Posts: 2,813
U.S.
Nadester Offline

Expert
Nadester  Offline

Expert

Joined: Jul 2002
Posts: 2,813
U.S.
Or just invert the colors of your textures


--Eric
Re: Colour invert [Re: Nadester] #52818
08/23/05 10:09
08/23/05 10:09
Joined: Aug 2005
Posts: 1,185
Ukraine
Lion_Ts Offline
Serious User
Lion_Ts  Offline
Serious User

Joined: Aug 2005
Posts: 1,185
Ukraine
OR USE MY GAMMARAMP.DLL
Look at usercontib thread.

Re: Colour invert [Re: Lion_Ts] #52819
08/23/05 16:40
08/23/05 16:40
Joined: Oct 2003
Posts: 4,131
M
Matt_Aufderheide Offline
Expert
Matt_Aufderheide  Offline
Expert
M

Joined: Oct 2003
Posts: 4,131
FAking an invert using gamma or somehting is not a good solution, becaxsue it would invert everything , include HUD elemnts and so on.. the best solution is to use render to texture, or materials.

Re: Colour invert [Re: Matt_Aufderheide] #52820
08/23/05 20:45
08/23/05 20:45
Joined: Nov 2004
Posts: 595
127.0.0.1
K
KoH Offline OP
Developer
KoH  Offline OP
Developer
K

Joined: Nov 2004
Posts: 595
127.0.0.1
Thanx Lion. Your dll does exactly what I wanted.
How would I edit it to "Fade to invert" and back?
Does it do grayscale and sepia?


I am no longer a member of these boards.
Re: Colour invert [Re: KoH] #52821
08/26/05 14:36
08/26/05 14:36
Joined: Aug 2005
Posts: 1,185
Ukraine
Lion_Ts Offline
Serious User
Lion_Ts  Offline
Serious User

Joined: Aug 2005
Posts: 1,185
Ukraine
Quote:

Thanx Lion. Your dll does exactly what I wanted.
How would I edit it to "Fade to invert" and back?
Does it do grayscale and sepia?



It does grayscale and sepia. And more.
But Matt right, gamma correction applies to entire screen.


Moderated by  Blink, Hummel, Superku 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1