Gamestudio Links
Zorro Links
Newest Posts
AlpacaZorroPlugin v1.3.0 Released
by kzhao. 05/22/24 13:41
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
Change chart colours
by 7th_zorro. 05/11/24 09:25
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (Akow, 1 invisible), 1,423 guests, and 9 spiders.
Key: Admin, Global Mod, Mod
Newest Members
AemStones, LucasJoshua, Baklazhan, Hanky27, firatv
19055 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 3 of 5 1 2 3 4 5
Re: pp bloom in gamestudio [Re: Gumby22don] #169235
11/29/07 15:26
11/29/07 15:26
Joined: May 2005
Posts: 2,713
Lübeck
Slin Offline
Expert
Slin  Offline
Expert

Joined: May 2005
Posts: 2,713
Lübeck
@Scorpion: Would you mind adding the code to the 3DGS Wiki? If you don´t have the time to but don´t mind, I could do it as well.

@Gumby22don: I don´t know what you are talking about, but I´m actually learning some more about shaders and am going to create some heat haze effect. But it isn´t really possible with this effect. I will add it to the wiki than, though it probably takes some more time until than...

Re: pp bloom in gamestudio [Re: Slin] #169236
11/29/07 15:37
11/29/07 15:37
Joined: Jan 2007
Posts: 1,619
Germany
Scorpion Offline OP
Serious User
Scorpion  Offline OP
Serious User

Joined: Jan 2007
Posts: 1,619
Germany
I don't mind if you do it.^^
maybe it would be good to write a hint: only aviable @ A7.07 and above or sth.

Re: pp bloom in gamestudio [Re: Scorpion] #169237
11/29/07 15:58
11/29/07 15:58
Joined: May 2005
Posts: 2,713
Lübeck
Slin Offline
Expert
Slin  Offline
Expert

Joined: May 2005
Posts: 2,713
Lübeck
I am not done with that wiki section yet (adding "my" shadercollection and try to put some of the shaders to an other site, so that on the main shadersection is only a selection of the most usable shaders and so on...) and it will take me some time to add the code, since I´m learning for school at the moment (you see why I am posting that much )...^^
But I will definatly add it soon

Sorry for going off-topic...

Re: pp bloom in gamestudio [Re: Slin] #169238
12/21/07 02:37
12/21/07 02:37
Joined: Oct 2003
Posts: 827
22�21'24"N 114�07'30"E
Frederick_Lim Offline
User
Frederick_Lim  Offline
User

Joined: Oct 2003
Posts: 827
22�21'24"N 114�07'30"E
A7.07 really looks good with this effect, my scene looks really good with these parameters.
Code:
var blurStrongness = 60;
var blurRadius = 0.5;
var blurAlpha = 80;
var darken = 90;
var greyOut = 140;



Re: pp bloom in gamestudio [Re: Frederick_Lim] #169239
12/21/07 02:53
12/21/07 02:53
Joined: Aug 2001
Posts: 2,320
Alberta, Canada
William Offline
Expert
William  Offline
Expert

Joined: Aug 2001
Posts: 2,320
Alberta, Canada
How would someone add Excessus's suggestion to the A7 code? I really like this effect, but I need the areas that are not white(for example, a sandy color, or the skycube) to brighten/bloom up as well. Because on some textures, the white is a bit too spotty, so the bloom looks like it's spotted allover the ground.


Check out Silas. www.kartsilas.com

Hear my band Finding Fire - www.myspace.com/findingfire

Daily dev updates - http://kartsilas.blogspot.com/
Re: pp bloom in gamestudio [Re: Excessus] #169240
12/21/07 05:57
12/21/07 05:57
Joined: Oct 2003
Posts: 827
22�21'24"N 114�07'30"E
Frederick_Lim Offline
User
Frederick_Lim  Offline
User

Joined: Oct 2003
Posts: 827
22�21'24"N 114�07'30"E
Quote:

float lum = dot(color, float3(0.299f, 0.587f, 0.114f);
return (float3)lum;



Sorry I am newbie in shader programming, which lines should I replace with the above?

Re: pp bloom in gamestudio [Re: Excessus] #169241
12/27/07 15:24
12/27/07 15:24
Joined: Oct 2003
Posts: 827
22�21'24"N 114�07'30"E
Frederick_Lim Offline
User
Frederick_Lim  Offline
User

Joined: Oct 2003
Posts: 827
22�21'24"N 114�07'30"E
Quote:

Quote:

if((Color.r+Color.g+Color.b)/3<vecSkill1.x)
{
Color.rgb = 0;
}




I think you will get a better quality bloom if you just calculate the luminance instead of making dark parts black. You can calculate luminance like this:
float lum = dot(color, float3(0.299f, 0.587f, 0.114f);
return (float3)lum;

Then just blur it and blend with the original render like you already do.




If I try to replace the lines I got the error:

Quote:

mtlBlackout(15): error X3017: cannot implicitly convert from 'float3' to 'float4'
> return (float3)lum; <




Please help. Thanks in advance.

Re: pp bloom in gamestudio [Re: Frederick_Lim] #169242
12/28/07 06:11
12/28/07 06:11
Joined: Mar 2006
Posts: 2,503
SC, United States
xXxGuitar511 Offline
Expert
xXxGuitar511  Offline
Expert

Joined: Mar 2006
Posts: 2,503
SC, United States
float lum = dot(color.rgb, float3(0.299f, 0.587f, 0.114f));

Color is usually a float4 (R G B A), but here you only need (R G B)


xXxGuitar511
- Programmer
Re: pp bloom in gamestudio [Re: xXxGuitar511] #169243
12/28/07 10:27
12/28/07 10:27
Joined: Oct 2003
Posts: 827
22�21'24"N 114�07'30"E
Frederick_Lim Offline
User
Frederick_Lim  Offline
User

Joined: Oct 2003
Posts: 827
22�21'24"N 114�07'30"E
After add the rgb I still get the same error

Re: pp bloom in gamestudio [Re: Frederick_Lim] #169244
12/28/07 17:03
12/28/07 17:03
Joined: Mar 2006
Posts: 2,503
SC, United States
xXxGuitar511 Offline
Expert
xXxGuitar511  Offline
Expert

Joined: Mar 2006
Posts: 2,503
SC, United States
oh, sorry. my mistake... I should have paid more attention. The problem is in the return (as highlighted by the error ).

return float4((float3)lum, 1.0);

The shader expects a return value for alpha transparency. Since it's bloom, we don't need transparency.


xXxGuitar511
- Programmer
Page 3 of 5 1 2 3 4 5

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