Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Dark GDK / Got DarkShader, now I need help.....

Author
Message
Hawkblood
10
Years of Service
User Offline
Joined: 5th Dec 2009
Location:
Posted: 8th Mar 2012 01:58
I made my first shader using DarkShader. I tested it using/modifying the example code:

Worked like a champ! Tore it apart to figure out how it works and I came up with:
load the camera effect and assign it to an image. (that took a while to realize)
make a plane to texture with the result of the bloom effect I made. (that took a while too)
load the "quad.fx" to basically press the plane against the camera.
now the loop:
hide the plane
show the objects you want in your scene.
sync the "bloom" camera
hide the scene objects
show the plane
sync the main camera

*POOF* the bloom works great. So I tried to empliment this in my X Flight game and *FIZZLE* I get a black screen..... Showing the entire engine of X Flight is too much, so I'll show you the setup and the delivery sections:
Setup:

Delivery:


I have no idea what is wrong.... As you can see, in the "example" that I modified, the object number for the plane and the image number for the "bloom" camera are set to the same values as in X Flight.

Please help.

The fastest code is the code never written.
Hawkblood
10
Years of Service
User Offline
Joined: 5th Dec 2009
Location:
Posted: 8th Mar 2012 02:22
Ok.... I've narrowed it down even more. I don't even need the plane, so here is the updated "example" code:

This makes it even simpler to do, but that just makes the fail even more epic! I modified X Flight to mirror the example but still the same......

The fastest code is the code never written.
Hawkblood
10
Years of Service
User Offline
Joined: 5th Dec 2009
Location:
Posted: 8th Mar 2012 02:49
ANTIALIASING!!!! I can't use AA with this effect.....

The fastest code is the code never written.
Morcilla
17
Years of Service
User Offline
Joined: 1st Dec 2002
Location: Spain
Posted: 9th Mar 2012 20:49 Edited at: 9th Mar 2012 20:49
That's true. It is a DGDK limitation. Rendering targets cannot be antialiased, and full-screen shaders like bloom use them. And so, you have to choose one thing or another (as far as I know).

Regarding your shader issue, I see you are not using "dbSyncMask"? Maybe that's the problem. It is needed.

Hawkblood
10
Years of Service
User Offline
Joined: 5th Dec 2009
Location:
Posted: 9th Mar 2012 21:04
My understanding is that dbSyncCamera(..) replaces the need for that. It masks to that camera and then calls sync.

The fastest code is the code never written.
Brendy boy
14
Years of Service
User Offline
Joined: 17th Jul 2005
Location: Croatia
Posted: 10th Mar 2012 03:26
Quote: "ANTIALIASING!!!! I can't use AA with this effect....."

There's a MSAA effect that is made in an fx file and can be combined with bloom. You could use that.

Here's a version made for FPSC.

Morcilla
17
Years of Service
User Offline
Joined: 1st Dec 2002
Location: Spain
Posted: 10th Mar 2012 11:59
@Brendy boy, Cool, I didn't know that, I'll give it a try

@Hawkblood, got it working or not? If not, did you change the bloom shader source code? Have you tried the original unmodified shader?

Hawkblood
10
Years of Service
User Offline
Joined: 5th Dec 2009
Location:
Posted: 10th Mar 2012 14:20
I got it to work. An I think I fully understand how it works now. Thanks. I'll have a look at MSAA....

The fastest code is the code never written.
Morcilla
17
Years of Service
User Offline
Joined: 1st Dec 2002
Location: Spain
Posted: 11th Mar 2012 11:50
I attach the bloom shader with AA.
It is used in the same way as the regular bloom shader.

Attachments

Login to view attachments
Morcilla
17
Years of Service
User Offline
Joined: 1st Dec 2002
Location: Spain
Posted: 11th Mar 2012 11:53
And here is the gorgeous Bond1's Adaptive Bloom shader, with AA included by uzi idiot.

Attachments

Login to view attachments
Hawkblood
10
Years of Service
User Offline
Joined: 5th Dec 2009
Location:
Posted: 11th Mar 2012 14:38
Thanks for the shaders. I like the ssaa one. The only problem is that "BloomWidth" looks like crap above 2.50000 and the effect itself is wider than it is tall. The image seems to blur well on the x-anxis but not as much on the y-axis. I also like the "low level cutoff" function-- that's what the others are missing.

The fastest code is the code never written.

Login to post a reply

Server time is: 2020-02-26 07:58:41
Your offset time is: 2020-02-26 07:58:41