klepto2 Posted May 15 Share Posted May 15 When using the skybox together with the angular fog you get artifacts in the corners like this: This can be fixed with something like this in the sky.frag: if (ExtractCameraFogSettings(CameraID, fogcolor, fogrange, fogangle)) { float slope = degrees(asin(normalize(texCoords).y)); if (slope < fogangle.y) { float l = clamp(1.0f - ((slope - fogangle.x) / (fogangle.y - fogangle.x)), 0.0f, 1.0f) * fogcolor.a; outColor[0].rgb = outColor[0].rgb * (1.0f - l) + fogcolor.rgb * l; } } just normalize the texcoords before calculating the slope: 1 Quote Windows 10 Pro 64-Bit-Version NVIDIA Geforce 1080 TI Link to comment Share on other sites More sharing options...
Solution Josh Posted May 19 Solution Share Posted May 19 Fixed! Quote My job is to make tools you love, with the features you want, and performance you can't live without. 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.