Goombert
|
|
Reply #75 Posted on: June 02, 2014, 09:48:26 am |
|
|
Location: Cappuccino, CA Joined: Jan 2013
Posts: 2993
|
BTW, this still is not a 100% fix, and a band aid, as there is something somewhere causing this, again this is just seems to shift things much like when I played with the projection ortho and GL MODEL VIEW offsets before Yes, that something is OpenGL, OpenGL uses texel centers for texturing, this is why OpenGL has pixel alignment problems in the sampler for certain cards such as yours, and Direct3D has the problem in the projection. 1) if I understood your comment to me, you are telling me that with offsets 0.00/0.00 for BOTH projection ortho and GL VIEW your text displays fine and no scrolling glitch right ? Actually, GL_MODELVIEW, and yes, no offsets works fine for me, everybody only complains when we add the offsets, you seem to have other problems though. Now, please try these four for me, as I have a feeling one of these will work perfectly. I need an accurate report for each one of these. float xoff = 0.5 / texture_get_width(fnt->texture), yoff = 0.5 / texture_get_height(fnt->texture); draw_vertex_texture(xx + g->x, yy + g->y, round((g->tx + xoff) * 100) / 100, round((g->ty + yoff) * 100) / 100); draw_vertex_texture(xx + g->x2, yy + g->y, round((g->tx2 + xoff) * 100) / 100, round((g->ty + yoff) * 100) / 100); draw_vertex_texture(xx + g->x, yy + g->y2, round((g->tx + xoff) * 100) / 100, round((g->ty2 + yoff) * 100) / 100); draw_vertex_texture(xx + g->x2, yy + g->y2, round((g->tx2 + xoff) * 100) / 100, round((g->ty2 + yoff)* 100) / 100);
float xoff = 0.5 / texture_get_width(fnt->texture), yoff = 0.5 / texture_get_height(fnt->texture); draw_vertex_texture(xx + g->x, yy + g->y, g->tx + xoff, g->ty + yoff); draw_vertex_texture(xx + g->x2, yy + g->y, g->tx2 + xoff, g->ty + yoff); draw_vertex_texture(xx + g->x, yy + g->y2, g->tx + xoff, g->ty2 + yoff); draw_vertex_texture(xx + g->x2, yy + g->y2, g->tx2 + xoff, g->ty2 + yoff);
float xoff = 0.5 / texture_get_width(fnt->texture), yoff = 0.5 / texture_get_height(fnt->texture); draw_vertex_texture(xx + g->x, yy + g->y, round((g->tx + xoff) * 100) / 100, round((g->ty + yoff) * 100) / 100); draw_vertex_texture(xx + g->x2, yy + g->y, round((g->tx2 - xoff) * 100) / 100, round((g->ty + yoff) * 100) / 100); draw_vertex_texture(xx + g->x, yy + g->y2, round((g->tx + xoff) * 100) / 100, round((g->ty2 - yoff) * 100) / 100); draw_vertex_texture(xx + g->x2, yy + g->y2, round((g->tx2 - xoff) * 100) / 100, round((g->ty2 - yoff)* 100) / 100);
float xoff = 0.5 / texture_get_width(fnt->texture), yoff = 0.5 / texture_get_height(fnt->texture); draw_vertex_texture(xx + g->x, yy + g->y, g->tx + xoff, g->ty + yoff); draw_vertex_texture(xx + g->x2, yy + g->y, g->tx2 - xoff, g->ty + yoff); draw_vertex_texture(xx + g->x, yy + g->y2, g->tx + xoff, g->ty2 - yoff); draw_vertex_texture(xx + g->x2, yy + g->y2, g->tx2 - xoff, g->ty2 - yoff);
|
|
« Last Edit: June 02, 2014, 09:50:15 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 #76 Posted on: June 02, 2014, 01:05:32 pm |
|
|
Joined: Jan 2014
Posts: 1238
|
Thanks will go through the new ones you posted today + some left overs from yesterday. You said "there is something else wrong with you...." No. There is only one thing so far, it's to do with fonts. The other minor things with fonts have nothing to do with ENIGMA but scaling. Normal that if you upscale fonts to native resolution they will exhibit strange looks, (stair step or some letters fatter, etc) that is NOT a problem, but an effect of upscaling when using game res that don't match your screen res.... Good practices are up to the game developer..... I could care less about that - What I am focusing on strictly now is the vertical line, dots and horizontal lines sometimes appearing on the fonts or around them.The fonts are neither blurry nor anything else. BTW as I mentioned before, round 100 did not work too well on the first set of tests tried yesterday round 1000 did, should I still use round 100 in your examples above or change it to 1000 ? Again here is another screenshot, result of 0 offset everywhere and all files back to their defaut. Now if I declare a font, example arial size 50, no AA, the fonts display crisp but there is a straight vertical line to the left of 1, but not all 1's, only a few out of the lot of 1's. unfortunately cannot take a screenshot of that in FS....... When using AA 1 + size 14 and above minimum these disappear and provide best results combined with the round 1000 as tested first time. For my testing I use Code used in draw event draw_text(10,10,"11111111111111111111111111111111");
Ignore the blurry look on the text, I resized them 200% in PSP to make them bigger, and used bicubic sample instead of pixel resize...... The text was razor sharp otherwise, coming from ENIGMA. This was done using monitor resolution 800x600, game room 640x480 But I've seen this behaviour also on 1920x1080 and other res. BTW, this is for OPENGL. I went back and checked DX9, it's unaffected, so DX9 works. so far.
|
|
« Last Edit: June 02, 2014, 02:09:09 pm by Darkstar2 »
|
Logged
|
|
|
|
|
|
egofree
|
|
Reply #79 Posted on: June 02, 2014, 02:42:09 pm |
|
|
Joined: Jun 2013
Posts: 601
|
My GPU has not changed, it is a GeForce GTX660 Ti SC 2GB
This is really strange, i've the GeForce GTX660 (OEM) 1.5GB, which is almost the same model, with the latest Nvidia drivers, and i don't have this problem. I didn't read the whole thread, but just in case, did you try some OpenGl demos with text ? To see if the problem comes from OpenGl drivers or only with Enigma.
|
|
|
Logged
|
|
|
|
egofree
|
|
Reply #80 Posted on: June 02, 2014, 02:52:42 pm |
|
|
Joined: Jun 2013
Posts: 601
|
What about using font_add_sprite ? : http://enigma-dev.org/docs/Wiki/Font_add_spriteAdds a new font from the given sprite with the sub images mapped to the characters. Perhaps it could be a workaround for your problem ?
|
|
|
Logged
|
|
|
|
Darkstar2
|
|
Reply #81 Posted on: June 02, 2014, 03:30:25 pm |
|
|
Joined: Jan 2014
Posts: 1238
|
My GPU has not changed, it is a GeForce GTX660 Ti SC 2GB
This is really strange, i've the GeForce GTX660 (OEM) 1.5GB, which is almost the same model, with the latest Nvidia drivers, and i don't have this problem. I didn't read the whole thread, but just in case, did you try some OpenGl demos with text ? To see if the problem comes from OpenGl drivers or only with Enigma.
Only with ENIGMA and yes I mentioned this before But that means nothing, the games or demos could be using their own internal fixes. Here use this test: copy and paste it in an object's draw event set your monitor resolution to 800x600 (for the purpose of this test) and room size 640x480 Set interpolation to off, scale aspect ratio, window mode and let me know. Make sure d3d set projection ortho offsets and GL MODEL VIEW offsets in GLMatrix.cpp are nil, meaning no offset at all ! draw_text(10,10,"11111111111111111111111111111111");
|
|
|
Logged
|
|
|
|
Darkstar2
|
|
Reply #82 Posted on: June 02, 2014, 03:33:30 pm |
|
|
Joined: Jan 2014
Posts: 1238
|
Robert, your latest suggestions didn't give me results, only worse: float xoff = 0.5 / texture_get_width(fnt->texture), yoff = 0.5 / texture_get_height(fnt->texture); draw_vertex_texture(xx + g->x, yy + g->y, round((g->tx + xoff) * 100) / 100, round((g->ty + yoff) * 100) / 100); draw_vertex_texture(xx + g->x2, yy + g->y, round((g->tx2 + xoff) * 100) / 100, round((g->ty + yoff) * 100) / 100); draw_vertex_texture(xx + g->x, yy + g->y2, round((g->tx + xoff) * 100) / 100, round((g->ty2 + yoff) * 100) / 100); draw_vertex_texture(xx + g->x2, yy + g->y2, round((g->tx2 + xoff) * 100) / 100, round((g->ty2 + yoff)* 100) / 100);
and float xoff = 0.5 / texture_get_width(fnt->texture), yoff = 0.5 / texture_get_height(fnt->texture); draw_vertex_texture(xx + g->x, yy + g->y, g->tx + xoff, g->ty + yoff); draw_vertex_texture(xx + g->x2, yy + g->y, g->tx2 + xoff, g->ty + yoff); draw_vertex_texture(xx + g->x, yy + g->y2, g->tx + xoff, g->ty2 + yoff); draw_vertex_texture(xx + g->x2, yy + g->y2, g->tx2 + xoff, g->ty2 + yoff);
Text is not rendered at all, nothing is shown. float xoff = 0.5 / texture_get_width(fnt->texture), yoff = 0.5 / texture_get_height(fnt->texture); draw_vertex_texture(xx + g->x, yy + g->y, round((g->tx + xoff) * 100) / 100, round((g->ty + yoff) * 100) / 100); draw_vertex_texture(xx + g->x2, yy + g->y, round((g->tx2 - xoff) * 100) / 100, round((g->ty + yoff) * 100) / 100); draw_vertex_texture(xx + g->x, yy + g->y2, round((g->tx + xoff) * 100) / 100, round((g->ty2 - yoff) * 100) / 100); draw_vertex_texture(xx + g->x2, yy + g->y2, round((g->tx2 - xoff) * 100) / 100, round((g->ty2 - yoff)* 100) / 100);
and float xoff = 0.5 / texture_get_width(fnt->texture), yoff = 0.5 / texture_get_height(fnt->texture); draw_vertex_texture(xx + g->x, yy + g->y, g->tx + xoff, g->ty + yoff); draw_vertex_texture(xx + g->x2, yy + g->y, g->tx2 - xoff, g->ty + yoff); draw_vertex_texture(xx + g->x, yy + g->y2, g->tx + xoff, g->ty2 - yoff); draw_vertex_texture(xx + g->x2, yy + g->y2, g->tx2 - xoff, g->ty2 - yoff);
Text completely distorted mess. Here is an example, ignore blurriness again, the postimage hosting somehow completely messes up the image quality. The edges are razor sharp otherwise originally.
|
|
|
Logged
|
|
|
|
Darkstar2
|
|
Reply #83 Posted on: June 02, 2014, 03:44:56 pm |
|
|
Joined: Jan 2014
Posts: 1238
|
Also tried all the below, even worse, and the ones with xoff/yoff don't render any text at all. So as of now I tried everything suggested, the only thing that works for me is draw_vertex_texture(xx + g->x, yy + g->y, round(g->tx * 1000) / 1000, round(g->ty * 1000) / 1000); draw_vertex_texture(xx + g->x2, yy + g->y, round(g->tx2 * 1000) / 1000, round(g->ty * 1000) / 1000); draw_vertex_texture(xx + g->x, yy + g->y2, round(g->tx * 1000) / 1000, round(g->ty2 * 1000) / 1000); draw_vertex_texture(xx + g->x2, yy + g->y2, round(g->tx2 * 1000) / 1000, round(g->ty2 * 1000) / 1000);
This works for default font. For declared font, any size 14 and above + AA of 1 or above works. Please refer to the many posts previous to this for explanations and screenshots. Thanks. Yes, try that with floor, ceil and float. And also try this mix.
draw_vertex_texture(xx + g->x, yy + g->y, floor(g->tx * 100) / 100, floor(g->ty * 100) / 100); draw_vertex_texture(xx + g->x2, yy + g->y, ceil(g->tx2 * 100) / 100, floor(g->ty * 100) / 100); draw_vertex_texture(xx + g->x, yy + g->y2, floor(g->tx * 100) / 100, ceil(g->ty2 * 100) / 100); draw_vertex_texture(xx + g->x2, yy + g->y2, ceil(g->tx2 * 100) / 100, ceil(g->ty2 * 100) / 100);
And also try this one. float xoff = 0.5 / texture_get_width(fnt->texture), yoff = 0.5 / texture_get_height(fnt->texture); draw_vertex_texture(xx + g->x, yy + g->y, round((g->tx + xoff) * 100) / 100, round((g->ty + yoff) * 100) / 100); draw_vertex_texture(xx + g->x2, yy + g->y, round((g->tx2 + xoff) * 100) / 100, round((g->ty + yoff) * 100) / 100); draw_vertex_texture(xx + g->x, yy + g->y2, round((g->tx + xoff) * 100) / 100, round((g->ty2 + yoff) * 100) / 100); draw_vertex_texture(xx + g->x2, yy + g->y2, round((g->tx2 + xoff) * 100) / 100, round((g->ty2 + yoff)* 100) / 100);
And this one. float xoff = 0.5 / texture_get_width(fnt->texture), yoff = 0.5 / texture_get_height(fnt->texture); draw_vertex_texture(xx + g->x, yy + g->y, g->tx + xoff, g->ty + yoff); draw_vertex_texture(xx + g->x2, yy + g->y, g->tx2 + xoff, g->ty + yoff); draw_vertex_texture(xx + g->x, yy + g->y2, g->tx + xoff, g->ty2 + yoff); draw_vertex_texture(xx + g->x2, yy + g->y2, g->tx2 + xoff, g->ty2 + yoff);
Also want to say that all this clusterFUCK of a problem that is a pain in my arsehole only affects TEXT ! Sprites, parts, shapes drawn all work fine, at least so far
|
|
« Last Edit: June 02, 2014, 03:52:23 pm by Darkstar2 »
|
Logged
|
|
|
|
|
Darkstar2
|
|
Reply #85 Posted on: June 02, 2014, 05:01:41 pm |
|
|
Joined: Jan 2014
Posts: 1238
|
Very confused here, Robert seems to suggest that everyone complains when offsets are present, and that I am the only one having issues with or without offsets, so by that I am to understand that nobody has any issues with fonts. I find that really difficult to digest because I tried this shit on different systems and all behaved the same way.
My current system this shit was tested on: Intel i5-3570k 16GB RAM Windows 7 64bit EVGA GeForce GTX 660 Ti SC 2GB Drivers 337.88 WHQL (NVIDIA) ---------------------------------------- My other older system I tried the same project on, as you can see major differences between hardware AMD Athlon X2 6400 2GB RAM Windows XP SP3 BFG GeForce 8800GTS 320 MB Very old forceware drivers
2 completely different systems, same bloody display, same exact thing, identically displayed.
2 different chipsets, CPUs, grpahic cards, OS, so this rules out that anything is wrong with my system !!!
|
|
|
Logged
|
|
|
|
|
|
|
Darkstar2
|
|
Reply #89 Posted on: June 02, 2014, 06:26:18 pm |
|
|
Joined: Jan 2014
Posts: 1238
|
Alright this is getting ridiculous.
I will make a new topic, I will upload ONE project and one alone and would appreciate if as many people run this one project and test it under exactly the same conditions as I am, so that we all can be on the same length. If people are using different resolutions, sizes, etc, it's not too accurate ....
As far as I'm concerned the problem is reproduced 100% with identical visual flaws on different systems I tested it on, that have completely different hardware.
And again I seem to have to repeat 1000000 times already - The only issue I am having is with fonts not displaying right as I posted in the screen shot, the 1111111111 is just an example, I see those lines and dots, etc on other letters fonts, sizes, etc. THAT'S IT, I have no other issues, not with sprites, not with parts, only fucking fonts!!!!!!
If worse comes to worse I will just compile my project with whatever setting works for me and tough fucking luck for the rest....... Thanks to those who posted and confirmed they too saw what I saw seeing, I'm not crazy! (YET but getting there!).
Thanks Robert for the initial suggestions, the round 1000 thing worked and the min 14px + AA1 makes it fully functional on all fonts and sizes I tried. Since the real root of the problem might be difficult to fix and requiring a rewrite or time nobody has, why not just use this if it works for everyone !?!?!? -----------------------------------------
|
|
|
Logged
|
|
|
|
|