Gamestudio Links
Zorro Links
Newest Posts
Help with plotting multiple ZigZag
by degenerate_762. 04/30/24 23:23
M1 Oversampling
by 11honza11. 04/30/24 08:16
Trading Journey
by howardR. 04/28/24 09:55
Zorro Trader GPT
by TipmyPip. 04/27/24 13:50
Data from CSV not parsed correctly
by jcl. 04/26/24 11:18
Why Zorro supports up to 72 cores?
by jcl. 04/26/24 11:09
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
3 registered members (Quad, VoroneTZ, PeroPero), 841 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
Newest Members
wandaluciaia, Mega_Rod, EternallyCurious, howardR, 11honza11
19049 Registered Users
Previous Thread
Next Thread
Print Thread
Rating: 5
Page 5 of 61 1 2 3 4 5 6 7 60 61
Re: Shade-C v0.91 BETA S1 [Re: FBL] #274588
06/27/09 13:24
06/27/09 13:24
Joined: Sep 2003
Posts: 9,859
F
FBL Offline
Senior Expert
FBL  Offline
Senior Expert
F

Joined: Sep 2003
Posts: 9,859
I made a screenshot concerning the shadows:


Re: Shade-C v0.91 BETA S1 [Re: FBL] #274593
06/27/09 13:57
06/27/09 13:57
Joined: May 2009
Posts: 1,816
at my pc (duh)
darkinferno Offline
Serious User
darkinferno  Offline
Serious User

Joined: May 2009
Posts: 1,816
at my pc (duh)
i dont get that prob with the shadows but once again, they are pitch black.. can i increase the brightness or something?

Re: Shade-C v0.91 BETA S1 [Re: darkinferno] #274606
06/27/09 14:57
06/27/09 14:57
Joined: Jun 2004
Posts: 655
to your left
BoH_Havoc Offline OP
User
BoH_Havoc  Offline OP
User

Joined: Jun 2004
Posts: 655
to your left
Thanks for the bug reports!

As there seem to be a lot of problems with the shadows, i changed some things (old shadows are still included, this is a new sType):
- Shadowmap gets encoded to a A8R8G8B8 (32bit argb) texture instead of a R32F (32bit floating point) texture. This runs on virtually any GFX Card and is also a little faster.
- Because of the encoding, Variance Shadowmapping can no longer be used, so i added a 3x3 PCF filtering instead. This doesn't look as good a vsm, but it's still nice and also runs on a lot of older hardware (should run on a GeforceFX and Radeon 9000, not tested though).

Here's what i still have to do (for performance optimizations and easier handling):
- Rewrite the global depthmap shader to encode it's map to a A8R8G8B8 texture
- Use that depthmap to draw full scene shadows (sType = 1) instead of rendering the full scene shadows in an additional pass. Will fasten things up a bit and shadows are drawn by deferred shading and not forward rendering. Might be useable for other things as well like ssao.
- Think of a way to get correct lighting when using scene shadows. This won't be perfect, but better than the current way how full scene shadows are added to the scene.

I will release a new snapshot next week so you guys can test the new shadows and see if they work or if you still get bugs.
If they do work, i will think about adding parallel split shadow mapping for better visuals. This will be another sType, so in the end you guys can choose exactly which shadows you want. Fast PCF filtered shadows which will run on a broad range of hardware, parallel split shadows with PCF which will be slower but nicer, variance shadows which will not run on all hardware, parallel split variance shadows which will (hopefully) look superb but will only make sense on high end GPUs.


Quote:
i dont get that prob with the shadows but once again, they are pitch black.. can i increase the brightness or something?


If you use sType = 0, you can increase the brightness with ambient_red/green/blue.
If you are using sType = 1, you can increase brightness by opening sc_vsmSun.fx in shade-c/fx and changing shadowAlpha. I forgot to include a simple method to change brightness through lite-c. Will include it in the next snapshot smile




Quote:
Do I see it right, that you don´t do anything to improve the shadow resolution and that it looks as good as it does just through the VSM?


Shadows are parallel projected and then use vsm. As you already said, there is nothing more to it wink

Quote:
Ähm...wie kann ich den bei den GS-Shadern die Schatten draufbringen?


At the moment you have to use sType = 1 to get shadows on gs-shaders. I'm working on it.

Quote:
And the god rays are a little bit weird. They only show up if you are looking directly into the sun. Shouldn't they always be visible? I think also the look of the rays could be improved. Now they look a bit like a bit blurry, instead of looking like this:


Good rays are indeed blurred a bit, so the shader doesn't have to use that many tabs and it will run on a broader range of hardware. As for the godrays only beeing displayed when looking into the sun: I don't know a method on how to do good looking godrays when not having the sun on screen. As soon as i find a fast solution for this, i will include it wink

Quote:
hello, it works, but if i use d3d_antialias it didn't work anymore


Yes, this is a known bug. I can't do anything about it.

Quote:
did a quick test with the sample level.
It's looking very cool already, but there are some issues on my system:

- shadows are not blurred and thus look very blocky
- resolution change seems to create bugs
- the longer I move around, the more flaws I get. Mainly shadow stripes going into nowhere
- after a few minutes the system hung, and after a few seconds of freeze, A7 closed itself. (no error message, but DirectX device is dead afterwards).

System: Geforce 7900GT, XP, Athlon XP 3500, 2Gig Ram, A7.77.0


You have to call sc_setup() again after changing the resolution. The DirectX device beeing dead after a few seconds sounds like you are calling sc_setup(), sc_smSunSetup(), sc_lightBeams() every frame in a while loop, which you shouldn't do. Do the examples work for you or do they also crash after a while?


Again, thanks for the feedback and sorry for all the bugs (especially the blocky shadows on some systems)


Shade-C EVO Lite-C Shader Framework
Re: Shade-C v0.91 BETA S1 [Re: BoH_Havoc] #274620
06/27/09 15:53
06/27/09 15:53
Joined: Jun 2004
Posts: 655
to your left
BoH_Havoc Offline OP
User
BoH_Havoc  Offline OP
User

Joined: Jun 2004
Posts: 655
to your left
Update:
sType = 1 shadows don't produce wrong lighting anymore smile
You can now use every shader you want together with shade-c's shadows and it will most likely look correct smile

So no need to rewrite all those shaders to support shadowmapping *phew* Also makes things a lot easier for me when implementing point light shadows for dynamic lights in the future *yay*





This was actually easier than i thought ...


Shade-C EVO Lite-C Shader Framework
Re: Shade-C v0.91 BETA S1 [Re: BoH_Havoc] #274622
06/27/09 16:15
06/27/09 16:15
Joined: Sep 2003
Posts: 9,859
F
FBL Offline
Senior Expert
FBL  Offline
Senior Expert
F

Joined: Sep 2003
Posts: 9,859
I only tried your sample when I wrote the report above.

Re: Shade-C v0.91 BETA S1 [Re: FBL] #274677
06/28/09 00:20
06/28/09 00:20
Joined: May 2009
Posts: 1,816
at my pc (duh)
darkinferno Offline
Serious User
darkinferno  Offline
Serious User

Joined: May 2009
Posts: 1,816
at my pc (duh)
the shadows jitter alot when moving, any way to correct this?

Re: Shade-C v0.91 BETA S1 [Re: darkinferno] #274732
06/28/09 09:07
06/28/09 09:07
Joined: Jul 2001
Posts: 6,904
H
HeelX Offline
Senior Expert
HeelX  Offline
Senior Expert
H

Joined: Jul 2001
Posts: 6,904
Hi,

Shade-C is superb and I hope you keep on developing for a while to make everything perfect :-) Kudos to you!

Quote:
I don't know a method on how to do good looking godrays when not having the sun on screen. As soon as i find a fast solution for this, i will include it


You are using a radial blur starting at the position of the sun, right? Can't you make it work also for positions outside the screen? Then you could calculate the "virtual" sun position somewhere at the screen border and then do the godrays.

Quote:
Do I see it right, that you don´t do anything to improve the shadow resolution and that it looks as good as it does just through the VSM?


I guess he wanted to ask how he could improve the shadow map resolution. To be honest, I didn't recognized how to switch it, too.

Other question: is it the case that the shadow of the foliage of the tree isn't rendered correctly, I mean.. doesn't your shadow mapping support alpha textures?

Last edited by HeelX; 06/28/09 09:07.
Re: Shade-C v0.91 BETA S1 [Re: HeelX] #274740
06/28/09 09:19
06/28/09 09:19
Joined: May 2005
Posts: 2,713
Lübeck
Slin Offline
Expert
Slin  Offline
Expert

Joined: May 2005
Posts: 2,713
Lübeck
Originally Posted By: HeelX
Hi,
Quote:
Do I see it right, that you don´t do anything to improve the shadow resolution and that it looks as good as it does just through the VSM?


I guess he wanted to ask how he could improve the shadow map resolution. To be honest, I didn't recognized how to switch it, too.


No, his answer was exactly what I wanted to know wink

Quote:

Other question: is it the case that the shadow of the foliage of the tree isn't rendered correctly, I mean.. doesn't your shadow mapping support alpha textures?


I think it does. The shadow resolution is just very low and thus you can only see it at the shadows edges.

Re: Shade-C v0.91 BETA S1 [Re: Slin] #274788
06/28/09 14:53
06/28/09 14:53
Joined: Jun 2004
Posts: 655
to your left
BoH_Havoc Offline OP
User
BoH_Havoc  Offline OP
User

Joined: Jun 2004
Posts: 655
to your left
Quote:
I only tried your sample when I wrote the report above.


Do you get crashes with all samples or just some of them?

Quote:
the shadows jitter alot when moving, any way to correct this?


If you are using sType=1 shadows then you can't do anything about the jittering at the moment. I'm working on it.

Quote:
Shade-C is superb and I hope you keep on developing for a while to make everything perfect :-) Kudos to you!


I hope so too, as there's still a lot of work to do wink

Quote:
You are using a radial blur starting at the position of the sun, right? Can't you make it work also for positions outside the screen? Then you could calculate the "virtual" sun position somewhere at the screen border and then do the godrays.


Yes that's how it's done. I don't know how to get a good virtual sun vector in screen space yet to apply the radial blur center to. If i get that working, the rest is piece of cake (at least that's what i hope wink )

Quote:
Other question: is it the case that the shadow of the foliage of the tree isn't rendered correctly, I mean.. doesn't your shadow mapping support alpha textures?


Alpha maps are supported, but as slin already said: Shadowmap resolution is very low, so you sometimes don't notice it as everything is blurry.

void sc_smSunSetup(var SMMapRes, var SMRes, var SMdepth, float SMblur, var sType)
To give the shadows a sharper look, you can decrease SMRes. The lower it gets, the sharper the shadows are. However there also is a smaller area where shadows are being cast. You can also use a low value for SMdepth, this will also sharpen the shadows, but will decrease the maximal z distance of shadows.


Shade-C EVO Lite-C Shader Framework
Re: Shade-C v0.91 BETA S1 [Re: BoH_Havoc] #274865
06/28/09 22:42
06/28/09 22:42
Joined: Aug 2005
Posts: 512
Bayern
Schmerzmittel Offline
User
Schmerzmittel  Offline
User

Joined: Aug 2005
Posts: 512
Bayern
Uhm...a very stupid question.

What the hell are Kudos? crazy


A7 Com V7.80
Page 5 of 61 1 2 3 4 5 6 7 60 61

Moderated by  aztec, Blink, HeelX 

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