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.

DarkBASIC Professional Discussion / GUI z-fighting or what ?

Author
Message
Kuper
16
Years of Service
User Offline
Joined: 25th Feb 2008
Playing: Planescape:Torment
Posted: 27th Jan 2017 00:21 Edited at: 27th Jan 2017 00:24
I work on GUI made in 3d.Window made of background object and corner objects.
I spread the a little bit in Z but get this strange artifact.It appears only near the middle of the screen.
It looks like edge pixels duplicates or maybe it is z-fighting?
I tried to change camera fov and near/far range of gui camera but cant make it disappear.

Ortu
DBPro Master
16
Years of Service
User Offline
Joined: 21st Nov 2007
Location: Austin, TX
Posted: 27th Jan 2017 01:07 Edited at: 27th Jan 2017 01:14
sure its not an issue in the texture images? a strip of missing/ alpha pixels in the grey texture? strip of extra pixels in the corner or border strip image that needs to be erased?

looks like it is present on the top right corner as well. is this a mirror of the same image as the bottom right corner?
http://games.joshkirklin.com/sulium

A single player RPG featuring a branching, player driven storyline of meaningful choices and multiple endings alongside challenging active combat and intelligent AI.
Kuper
16
Years of Service
User Offline
Joined: 25th Feb 2008
Playing: Planescape:Torment
Posted: 29th Jan 2017 03:59 Edited at: 29th Jan 2017 04:08
I added project files and compiled exe - if you dont won't to eplore the code.
Texture mirrors on the edge - also if I changed texture mode in shader
It happens in horizontal and vertical dimensions - just hold control and move mouse

Attachments

Login to view attachments
Green Gandalf
VIP Member
19
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 15th Feb 2017 15:08 Edited at: 15th Feb 2017 15:09
I don't see that issue when I run your exe. Also, I cannot compile the source. Is there a missing Plugin?

Here's what I see:



I compiled using DBPro DX9Ex in case that's relevant.


Powered by Free Banners

Attachments

Login to view attachments
Kuper
16
Years of Service
User Offline
Joined: 25th Feb 2008
Playing: Planescape:Torment
Posted: 15th Feb 2017 17:02
Its appears when you drag window near the middle of the screen ( hold control to do this )
Ive add source and exe version 2.
What plugin does it require? I think i dont use any in this project.

Attachments

Login to view attachments
WickedX
15
Years of Service
User Offline
Joined: 8th Feb 2009
Location: A Mile High
Posted: 15th Feb 2017 17:48 Edited at: 15th Feb 2017 18:11
The executable doesn't show the issue here as well. The plugin used is Enhancements. Still no issue after moving the panel.

Edit: Also appears to use enhanced animation.
Green Gandalf
VIP Member
19
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 15th Feb 2017 17:52 Edited at: 15th Feb 2017 18:36
Just checked again. The compiler doesn't recognize OPEN FILE BLOCK.

I tried moving the object around but the problem still didn't appear.

I'll try your new version next.

Edit Just tried that and it won't run - unsupported video format. I won't be able to run it unless I can compile it - which I can't.

Edit2 Out of curiosity I tried changing the screen mode and commenting out every line the compiler didn't like. The program ran and still no sign of your glitch - but some strange text appeared. I couldn't see where it came from. See attached image. Just curious.


Powered by Free Banners

Attachments

Login to view attachments
Kuper
16
Years of Service
User Offline
Joined: 25th Feb 2008
Playing: Planescape:Torment
Posted: 16th Feb 2017 16:35
Very strange...I compile in original DBPro but it still exist.=( Il check this on laptop.Maybe something wrong with my videocard?
Lost plugin - its enchacement pack ( i use it to archive all necessary stuff in .dat files )
Anyway thanks GG!
smerf
19
Years of Service
User Offline
Joined: 24th Feb 2005
Location: nm usa
Posted: 22nd Feb 2017 04:36 Edited at: 22nd Feb 2017 04:49
Your not alone kuper I have the same problem artifact only appears when window is near center of screen. The artifact is a repeat of the right edge of the right corner gold.dds . Your code is crazy complex for me so id recommend you focus on the code for getting rotating and position the image.
I noticed the artifacts only happen once its past 444 x coord so had a hunch to look for 444 in code and what do u guess.
Line: 78 GUIElement_SetPosition("MainWindow",1,"",444, 283) culprit related to this im betting
A child's dream never dies.





Attachments

Login to view attachments
Green Gandalf
VIP Member
19
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 22nd Feb 2017 17:04
Looks like a promising find.
Kuper
16
Years of Service
User Offline
Joined: 25th Feb 2008
Playing: Planescape:Torment
Posted: 2nd Mar 2017 15:19
I finally found that its all about texture filtering
I have
MagFilter=point;
MinFilter=linear;
MipFilter=none;
in shader file to have crisp texture render but get something like edges os screen
( they are always but especially noticable when drag objects on screen )
I think it something about how DBPro filters textures at render so can't be cured.
So I changed Filter to anisotropic.
Thats helps
Green Gandalf
VIP Member
19
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 6th Mar 2017 19:10
Not sure how filtering affects this. It sounds to me more like a texture clamping versus wrapping issue to me. Have you tried setting the texture wrap mode to clamp? I think the default is wrap.
Kuper
16
Years of Service
User Offline
Joined: 25th Feb 2008
Playing: Planescape:Torment
Posted: 6th Mar 2017 20:02
@GG
Yes, I tested Clamp mode in shader but edge jittering was still there
Green Gandalf
VIP Member
19
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 6th Mar 2017 21:13
Hmm? Puzzling.
smerf
19
Years of Service
User Offline
Joined: 24th Feb 2005
Location: nm usa
Posted: 7th Mar 2017 17:51
clamp probably shouldn't be used it could actually cause weird artifacts its usually used for sprite tiles for scaling tiles without seams
A child's dream never dies.





Login to post a reply

Server time is: 2024-04-20 02:48:55
Your offset time is: 2024-04-20 02:48:55