long_gone Posted January 31, 2022 Posted January 31, 2022 when I switch to windowed mode, texture I'm rendering gets distorted(edges) (It's working perfectly in fullscreen mode)
βurak Posted January 31, 2022 Posted January 31, 2022 I'm not sure but you can use dxCreateTexture for this also you can change the "textureEdge" parameter to "clamp" Tip: To help prevent edge artifacts when drawing textures, set textureEdge to "clamp" when calling dxCreateTexture https://wiki.multitheftauto.com/wiki/DxCreateTexture
long_gone Posted January 31, 2022 Author Posted January 31, 2022 1 hour ago, Burak5312 said: I'm not sure but you can use dxCreateTexture for this also you can change the "textureEdge" parameter to "clamp" Tip: To help prevent edge artifacts when drawing textures, set textureEdge to "clamp" when calling dxCreateTexture https://wiki.multitheftauto.com/wiki/DxCreateTexture didn't work
Moderators IIYAMA Posted February 1, 2022 Moderators Posted February 1, 2022 15 hours ago, long_gone said: (It's working perfectly in fullscreen mode) With what resolution (math) do you draw your image?
long_gone Posted February 1, 2022 Author Posted February 1, 2022 (edited) 2 hours ago, IIYAMA said: With what resolution (math) do you draw your image? float GetCoord(float a) { float base = RsGlobal.maximumWidth > RsGlobal.maximumHeight ? static_cast<float>(RsGlobal.maximumHeight) : static_cast<float>(RsGlobal.maximumWidth); return static_cast<float>(static_cast<int>(a * base / gScreenResolution)); } i pass 0/0/ and 2084 / 128 for vertices Edited February 1, 2022 by long_gone
Moderators IIYAMA Posted February 1, 2022 Moderators Posted February 1, 2022 5 hours ago, long_gone said: float GetCoord(float a) { float base = RsGlobal.maximumWidth > RsGlobal.maximumHeight ? static_cast<float>(RsGlobal.maximumHeight) : static_cast<float>(RsGlobal.maximumWidth); return static_cast<float>(static_cast<int>(a * base / gScreenResolution)); } i pass 0/0/ and 2084 / 128 for vertices It might be a ppi issue. (I am not a shader expert) but let me speculate a bit. Afaik: When playing with border less settings and window mode, the same resolution is returned on https://wiki.multitheftauto.com/wiki/GuiGetScreenSize Not sure if you used that one to create your render target. This might put a difference between the resolution the shader is placing the texture on the screen and the resolution delivered by the texture. If this situation is matching yours, what if you do not scale the texture? But placing it with the exact size. Either by the texture size or by the pixels the shader is about to draw. Anyway, those artifacts are most of the time caused by some sort of scaling. 2
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now