mightymarcus Posted April 26, 2017 Share Posted April 26, 2017 I have a big problem with screen tearing. Please have a look at the video. I am sorry I can't provide a playground for this (yeah I could maybe), because I am using a port of babylonjs together with the haxe language/compiler. I read much information about the problem in OpenGL forums too, but I did not get a solution. So maybe some 3D WebGL / OpenGL ES Guru knows, how to fix the problem. As you can see in the video, the mesh with the bricks and ladders is flickering and tearing like hell. The mesh is merged together from single meshes (planes) and a sprite atlas is used, so that I can take one material/texture for the whole level-mesh (the foreground). To get the well known sprite art or retro effect, I use Texture.NEAREST_SAMPLINGMODE texture.anisotropicFilteringLevel = 1 texture.wrapU = texture.wrapV = Texture.CLAMP_ADDRESSMODE I tried to adjust the uvs (read about pixels and texels), but I don't get it right. I think that the UVs are not correct and when the camera moves, the drawn texture tile is snapping between two pixels all the time, and that causes the bad tearing effect. But I don't know. Since I am using Babylonjs/Babylonhx, I am asking here for the first place. It's strange too, that it looks like the lines are jumping up and down. And maybe the uvs are right, but the screen tearing is a evil, that comes with the NEAREST_SAMPLINGMODE or the disabled anisotropicFiltering? Btw. I disabled mipmaps too. Hm. It would be easier to just scale the Textures up hm and use another sampling mode? Because now I get it, that not using mipmaps is a bad idea, because I have a little 3D stuff in there, like the sides and the floor. Yeah I know, there is another topic to this topic. But I didn't find the answer there. Yeah, that's great. I think I have the right solution now. Upscaled textures. But to be honest and just to learn how to do it right, is there another way how I can do this? Merging planes with different uvs together and using a very small texture (one tile = 32px) without having artefacts? Quote Link to comment Share on other sites More sharing options...
mightymarcus Posted April 26, 2017 Author Share Posted April 26, 2017 Hm. Just for the record: Very small textures and anisotopicFilteringLevel = 1 generally produces screen tearing, when the camera is moving very slow. I made the (non-tiled) background a high constrast, and it can be seen, that it's tearing the same like the tiled foreground. Quote Link to comment Share on other sites More sharing options...
Umz Posted April 26, 2017 Share Posted April 26, 2017 Sorry, know nothing about the issue Unrelated question, But, which Screen Recorder are you using?? It is absolutely awesome. Or is it just the power of the PC you're on? Quote Link to comment Share on other sites More sharing options...
mightymarcus Posted April 27, 2017 Author Share Posted April 27, 2017 It's bundled with the Radeon Drivers and is called ReLive. And yes, it's very good. Better as you can see here (Youtube messed the video a little bit up). Last time I recorded the desktop and then I was looking the video. I got to the toilet, came back ... and wtf? Why can't I click? What is wrong here? Uhhh ... it's not the actual desktop. It is the video ... Umz 1 Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted April 27, 2017 Share Posted April 27, 2017 Hello this is a great video If you don't mind I would love to get a playground highlighting the issue because only a video is not enough Quote Link to comment Share on other sites More sharing options...
mightymarcus Posted April 28, 2017 Author Share Posted April 28, 2017 Yes, I will do. I'll try to recreate the problem in the playground and show you exactly what I mean (over the weekend). Thank you. GameMonetize 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.