Darkstar2
|
|
Posted on: May 25, 2014, 01:39:08 pm |
|
|
Joined: Jan 2014
Posts: 1238
|
As I was testing the new changes since #732, I accidentally ran into the same issue I had with font rendering. I thought this was fixed with the 0.25/0.25 thing, but now it's back:
To reproduce create a project using OGL1 or OGL3, as both exhibit the problem:
Add to the draw code
draw_text(10,10,"11111111111111111111");
Be it window or full screen mode, not displayed right.
In Direct3D window mode it's ok, but could not test full screen as Direct3D fullscreen is still broke, nothing gets displayed in D3D full screen.
|
|
« Last Edit: May 28, 2014, 12:17:39 pm by Darkstar2 »
|
Logged
|
|
|
|
Darkstar2
|
|
Reply #1 Posted on: May 25, 2014, 02:14:20 pm |
|
|
Joined: Jan 2014
Posts: 1238
|
Ok I don't know if this is in relation to the latest fixes in #723, and will wait for Robert's input on this, but apparently the half pixel adjustment is no longer needed after #723 ?
I fixed this by editing GLMatrix.cpp and GL3Matrix.cpp and commenting out the added offset codes for the HPA.
void d3d_set_projection_ortho(gs_scalar x, gs_scalar y, gs_scalar width, gs_scalar height, gs_scalar angle) { // This is half-pixel alignment, 0.5 only works for some graphics cards, 0.25 works best for Nvidia, AMD, and other common graphics cards and drivers. // x += 0.25f; y += 0.25f;
The last line is the one I commented out.
Clean built and it worked for both gfx systems.
Before recent merges, this was required to display fonts properly.
Does this have to do with some of the recent changes made to 723?
If I uncomment and add them back, the problem is back.
|
|
|
Logged
|
|
|
|
|
Darkstar2
|
|
Reply #3 Posted on: May 25, 2014, 04:15:19 pm |
|
|
Joined: Jan 2014
Posts: 1238
|
It's just possible that it works for one, but doesn't work for the other (GPU differences). What GPU do you have? Maybe 0.375 really is the magic number.
Actually I didn't change GPU or systems. Initially it was tested by Robert and he also had the problem, so he added those lines and it worked fine. However, since a latest fix update, even with his new pixel alignment fix, the fonts are not displayed correctly so I had to remove them, and now they work. My GPU has not changed, it is a GeForce GTX660 Ti SC 2GB and no, 0.375 is not the magic number unless you want flickering and gaps in scrolling rooms.
|
|
|
Logged
|
|
|
|
Goombert
|
|
Reply #4 Posted on: May 25, 2014, 06:22:30 pm |
|
|
Location: Cappuccino, CA Joined: Jan 2013
Posts: 2993
|
No 0.375,0.375 for both the model view matrix and the projection work perfectly here, I was afraid they wouldn't work on your hardware because that makes it a combined 0.75, and I encourage you to try it. Also please try 0.25,0.25 for the projection and 0.125,0.125 for the model view matrix, and then vice versa. Let me know how each one performs, because all of those work for me.
Also, Darkstar2, he's not talking about a difference in your GPU, he's talking about the difference between your GPU and MY GPU, because you have Nvidia, and I have AMD. Both graphics card manufacturers have different rounding implementations.
|
|
« Last Edit: May 25, 2014, 06:24:24 pm by Robert B Colton »
|
Logged
|
I think it was Leonardo da Vinci who once said something along the lines of "If you build the robots, they will make games." or something to that effect.
|
|
|
|
Goombert
|
|
Reply #6 Posted on: May 25, 2014, 07:34:14 pm |
|
|
Location: Cappuccino, CA Joined: Jan 2013
Posts: 2993
|
Because that doesn't work for me in fullscreen, that's why, we need a solution that works in both windowed and fullscreen in all cases for both me AND YOU. These are the two lines to test. https://github.com/enigma-dev/enigma-dev/blob/master/ENIGMAsystem/SHELL/Graphics_Systems/OpenGL1/GLmatrix.cpp#L111https://github.com/enigma-dev/enigma-dev/blob/master/ENIGMAsystem/SHELL/Graphics_Systems/OpenGL1/GLmatrix.cpp#L128Try each of these combinations and report the behavior: 0.25,0.25 and 0.125,0.125 0.125,0.125 and 0.25,0.25 0.375,0.375 and 0.375,0.375 0.125,0.125 and 0.375,0.375 0.25,0.25 and 0.375,0.375 0.375,0.375 and 0.25,0.25 0.375,0.375 and 0.125,0.125 Once you tell me which ones work for you we can choose one of them that works for me too, and we'll go with it.
|
|
|
Logged
|
I think it was Leonardo da Vinci who once said something along the lines of "If you build the robots, they will make games." or something to that effect.
|
|
|
Darkstar2
|
|
Reply #7 Posted on: May 25, 2014, 10:46:28 pm |
|
|
Joined: Jan 2014
Posts: 1238
|
Ok the Dr. is in with the results When I mention borders they occur only on screen resolution higher than 1600x900 for all tests. Anything at or below shows no border. 0.00,0.00 and 0.25,0.25 text ok - scroll ok - border top left 0.25,0.25 and 0.25,0.25 (original settings) text bad - scroll ok - border top left 0.25,0.25 and 0.125,0.125 text ok - scroll ok - no border 0.125,0.125 and 0.25,0.25 text ok - scroll ok - no border 0.375,0.375 and 0.375,0.375 text bad - scroll ok - no border 0.125,0.125 and 0.375,0.375 text ok - scroll ok - border top left 0.25,0.25 and 0.375,0.375 text ok - scroll ok - no border 0.375,0.375 and 0.25,0.25 text ok - scroll ok - no border 0.375,0.375 and 0.125,0.125 text ok - scroll ok - border lower right ======================= So the combinations that work for me 0.25,0.25 and 0.125,0.125 0.125,0.125 and 0.25,0.25 0.25,0.25 and 0.375,0.375 0.375,0.375 and 0.25,0.25 I didn't see the scrolling issue on any test. So since 0.375 is recommended we should probably pick from one of the last 2. The rest is in your hands. If you need any more info or testing let me know.
|
|
|
Logged
|
|
|
|
Goombert
|
|
Reply #8 Posted on: May 25, 2014, 11:52:39 pm |
|
|
Location: Cappuccino, CA Joined: Jan 2013
Posts: 2993
|
Thank you, finally, that's just what we needed. All 4 of those work fine with text and in windowed mode, and dont have the 1px border in fs, but have a problem with repeating scrolling backgrounds in fs for me.
I wish we could eliminate two more of them, I have AMD, you have Nvidia, somebody should test your two sets on an Intel.
Please test these now: 0.375,0.375 and 0.175,0.175 0.175,0.175 and 0.375,0.375 0.1875,0.1875 and 0.1875,0.1875
These are the only values that work for me in all cases.
|
|
« Last Edit: May 26, 2014, 12:06:48 am by Robert B Colton »
|
Logged
|
I think it was Leonardo da Vinci who once said something along the lines of "If you build the robots, they will make games." or something to that effect.
|
|
|
|
|
Goombert
|
|
Reply #11 Posted on: May 26, 2014, 12:55:14 am |
|
|
Location: Cappuccino, CA Joined: Jan 2013
Posts: 2993
|
How the hell are you criticizing my card? Mine is the one that draws everything fine with no offset, yours is the one that can't round.
At any rate, we're still fucked, we need a magic number that works perfect for both of us.
Try this one. 0.125,0.125 and 0.125,0.125
|
|
|
Logged
|
I think it was Leonardo da Vinci who once said something along the lines of "If you build the robots, they will make games." or something to that effect.
|
|
|
Darkstar2
|
|
Reply #12 Posted on: May 26, 2014, 01:03:12 am |
|
|
Joined: Jan 2014
Posts: 1238
|
How the hell are you criticizing my card? Mine is the one that draws everything fine with no offset, yours is the one that can't round.
LMAO! BTW, is there a way to dynamically affect this alignment using EDL or GML functions within the game you mentioned the code in the past... At any rate, we're still fucked, we need a magic number that works perfect for both of us.
Try this one. 0.125,0.125 and 0.125,0.125
Fs, window, text = bad. scroll = ok. There is one little thing I will try tomorrow, not having to do with these settings, I am calling it a night for today
|
|
|
Logged
|
|
|
|
Goombert
|
|
Reply #13 Posted on: May 26, 2014, 01:28:53 am |
|
|
Location: Cappuccino, CA Joined: Jan 2013
Posts: 2993
|
Uh yeah, just pass the offsets to d3d_set_projection ortho.
Anyway, I only have a few more that work for me. 0.175,0.175 and 0.175,0.175 0.275,0.275 and 0.175,0.175 0.175,0.175 and 0.275,0.275 0.6,0.6 and 0.4,0.4 0.4,0.4 and 0.6,0.6
Try themtomorrow. The only way this would not be an issue is we could use the one that works when not in fs and do real fullscreen then the display resolution would 1v1 with the game resolution and one of those would work in both cases.
|
|
« Last Edit: May 26, 2014, 01:42:01 am by Robert B Colton »
|
Logged
|
I think it was Leonardo da Vinci who once said something along the lines of "If you build the robots, they will make games." or something to that effect.
|
|
|
Darkstar2
|
|
Reply #14 Posted on: May 26, 2014, 02:03:31 am |
|
|
Joined: Jan 2014
Posts: 1238
|
Will do and how do I pass the second set of value (model view) ? Uh yeah, just pass the offsets to d3d_set_projection ortho.
Anyway, I only have a few more that work for me. 0.175,0.175 and 0.175,0.175 0.275,0.275 and 0.175,0.175 0.175,0.175 and 0.275,0.275 0.6,0.6 and 0.4,0.4 0.4,0.4 and 0.6,0.6
Try themtomorrow. The only way this would not be an issue is we could use the one that works when not in fs and do real fullscreen then the display resolution would 1v1 with the game resolution and one of those would work in both cases.
|
|
|
Logged
|
|
|
|
|