Gamestudio Links
Zorro Links
Newest Posts
Linear Regression in objective function
by brax
Yesterday at 20:32
Experienced 2D|3D Character artist|Concept Artist@ Indie Prices|
by DeathstalkerArs
Yesterday at 17:58
New Zorro version 1.66
by MatPed
Yesterday at 11:15
Cutting meshes merging meshes
by rayp
Yesterday at 05:51
Increase Max Lot Size Beyond 10000
by jcl
11/20/17 11:09
Spread value conditional
by ech87
11/20/17 08:58
MT4 vs Zorro
by Spirit
11/20/17 08:36
AUM Magazine
Latest Screens
RPG PARTY
Triton Wing now available on Steam
AckCon'17: Lotter vs The World
Triton Wing
Who's Online
4 registered (AndrewAMD, firecrest, vinsom, 1 invisible), 492 Guests and 6 Spiders online.
Key: Admin, Global Mod, Mod
Newest Members
ech87, Lobo, Andy60, AzzoCorp, franzz
17813 Registered Users
Topic Options
Rate This Topic
#466926 - 07/08/17 22:59 shade-c (evo) black lines on some resolutions
Reconnoiter Offline
Serious User

Registered: 12/26/11
Posts: 1776
Loc: Netherlands
Howdy,

With shade-c evo when I set the resolution to windowed or to something else than what the max of my monitor is (full hd), I get black lines (vertical) everywhere. I dont have this with default gs3d shaders. Any idea what it could be? (I also have it for the shade-c evo examples)

So e.g. 1920x1080 fullscreen works, but 1366x768 gives black lines (whether windowed or fullscreen).


Edited by Reconnoiter (07/08/17 23:00)

Top
#467026 - 07/12/17 20:44 Re: shade-c (evo) black lines on some resolutions [Re: Reconnoiter]
DriftWood Offline
Newbie

Registered: 07/03/14
Posts: 46
There was something about restarting shade-c after resolution changes.
Think it was in the comments. And old shade-c posts.

Top
#467045 - 07/13/17 12:38 Re: shade-c (evo) black lines on some resolutions [Re: DriftWood]
Reconnoiter Offline
Serious User

Registered: 12/26/11
Posts: 1776
Loc: Netherlands
Hi DriftWood,

On map change I already restart shade-c ( /first sc_destroy(sc_screen_default); and than start it again 5 frames after the level is loaded) but the black lines still appear.

However when I disable shade-c antialiasing (sc_screen_default.settings.antialiasing.enabled = 0; ) in shade-c initialize function the black lines are gone but it now gives me "invalid function arguments in physx_open" errors when loading a new map. I call physX_open(); once on game startup for simple physics / rigid entities.

If I do call physX_close(); and physX_open(); on the next levels I open (/so excluding the intro map) I dont get error messages but physx gets bugged out (actors cannot move etc).
I am not entirely sure, but iirc I dont see tutorials or the manual etc that use physX_close(); at all (also I cannot even find it in the manual, only in ackphysX.h) so probably I should not use that function (maybe bad code or such).

Anyway sorry for derailing a bit there but I wanted to give the whole picture.

In short: setting sc_screen_default.settings.antialiasing.enabled = 0; removes the black lines but messes up physx_open for some reason.

Thanks for taking the time, appreciate it.

Top
#467083 - 07/15/17 04:59 Re: shade-c (evo) black lines on some resolutions [Re: Reconnoiter]
DriftWood Offline
Newbie

Registered: 07/03/14
Posts: 46
Yuck... That's a knot of problems with no clear link. I'm sure not digging in that hole.

http://www.conitec.net/beta/pX_intro.htm
http://www.conitec.net/beta/physX_open.htm

Please look at the function physX_level_load()
And the On_level_load in physX_open()

Oh and wasn't it important to have the right version installed? It's not the current version but an old one right.



Edited by DriftWood (07/15/17 05:02)

Top
#467104 - 07/15/17 21:01 Re: shade-c (evo) black lines on some resolutions [Re: DriftWood]
Reconnoiter Offline
Serious User

Registered: 12/26/11
Posts: 1776
Loc: Netherlands
I looked in the physX_open function a bit more in it but could not find anything that explains this weird behaviour. Anyway I did find an other semi solution; setting sc_screen_default.settings.lights.sunShadows = 0; also removes the black lines and does not give any errors (plus it actually increases fps alot so the game is than also playable on older / slower systems, which is probably on the same computers that play the game on lower resolutions than their monitor/system can handle).

Top
#467107 - 07/16/17 05:35 Re: shade-c (evo) black lines on some resolutions [Re: Reconnoiter]
DriftWood Offline
Newbie

Registered: 07/03/14
Posts: 46
Oh now. ....light.sunShadows...
This sound like pssm shadows. Older pssm had black lines and shuttering effects. Slin and others worked them out better.
Just working the idea, could be you have to stop and restart pssm on resolution changes. Also adjust the shadow map resolution and split numbers.
Turning off any pssm sun based shadows will greatly improve rendering speeds. Slin's last version would cut my frame rate in half, so I'm sure shade-c pssm shadows do at the same.

Pssm was a bottle neck. It required fine tuning or you'd kill frame rates. I also know using stencil shadows cause black lines from unclosed mesh models.

Top
#467137 - 07/17/17 22:10 Re: shade-c (evo) black lines on some resolutions [Re: DriftWood]
Reconnoiter Offline
Serious User

Registered: 12/26/11
Posts: 1776
Loc: Netherlands
Okay ty for the info. I have delved some in the shade-c sun/shadow scripts, not yet found the problem/solution but did notice I gained a minor boost to fps without noticeable loss by setting splits to 3 (lower disables sun shadows):
sc_screen_default.settings.lights.sunPssmSplits = 3;

I also noticed that the problem only occurs for sun shadows, and not for shadows of shade-c spotlights. (Though shadows of spotlights only work well at small radius's & arcs it seems so its more supporting it than replacing sun entirely.)


Edited by Reconnoiter (07/17/17 22:11)

Top
#467178 - 07/19/17 14:11 Re: shade-c (evo) black lines on some resolutions [Re: Reconnoiter]
Reconnoiter Offline
Serious User

Registered: 12/26/11
Posts: 1776
Loc: Netherlands
Okay I quess I found a solution; in sc_lights_sunShadowEdge.fx find the line half2 blurAmt = (5.0f/shadowmapSize)*rand.xy;
Now change it into something like this half2 blurAmt = (5.0f/shadowmapSize)*rand.xy*200;

My quess is that this blurs (or maybe pixellates) the edges of shadows more hence why it removes (mostly) the black lines.

And I see now that sc_screen_default.settings.lights.sunPssmSplits is better to be left at 4, otherwise shadows a bit further away can look weird.

Top
#467235 - 07/21/17 16:53 Re: shade-c (evo) black lines on some resolutions [Re: Reconnoiter]
DriftWood Offline
Newbie

Registered: 07/03/14
Posts: 46
For more info on splits, shadowmap res, blur and thresholds in pssm you'll have ask the shader guys like Slin.
A short pm from one of them can explain more than hours of me reading up.
Also you try reading up on pssm on the internet. It's not a gs3d exclusive thing.

Top



Gamestudio download | chip programmers | Zorro platform | shop | resources | magazine | manual | support faq | bugs

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) 3dgamestudio.net