Olby Posted January 31, 2015 Share Posted January 31, 2015 I created a simple terrain and enabled the default skybox. If .mat file is used then the water plane will not reflect it properly. With sky.tex With sky.mat Quote Intel Core i7 Quad 2.3 Ghz, 8GB RAM, GeForce GT 630M 2GB, Windows 10 (x64) Link to comment Share on other sites More sharing options...
xtom Posted January 31, 2015 Share Posted January 31, 2015 Ah that's the problem I was getting and I mentioned it on one the water blog posts. Didn't realize the .tex gave a better result. Quote Check out my games: One More Day / Halloween Pumpkin Run Link to comment Share on other sites More sharing options...
Admin Posted February 1, 2015 Share Posted February 1, 2015 This might be an old build. It looks like the water plane is not extending out far enough. Quote Link to comment Share on other sites More sharing options...
Olby Posted February 2, 2015 Author Share Posted February 2, 2015 Nope, its still messed up. Less obvious now, but there is a thick black line around the edges of water plane. Tried playing with various video settings - no difference. The snaps taken below are at max video config. Camera is not moved between the shots, note how the water plane (when skybox is set to .mat) is clipped for some reason. Quote Intel Core i7 Quad 2.3 Ghz, 8GB RAM, GeForce GT 630M 2GB, Windows 10 (x64) Link to comment Share on other sites More sharing options...
Josh Posted February 2, 2015 Share Posted February 2, 2015 It's actually working as intended. Let me explain why: When a texture is used a simple cubemap lookup is performed. The sky material, on the other hand, is intended for placing blocks of sky that only appear in parts of the scene. This uses a derivative of the regular model shader. The shader uses a clipping plane to discard pixels that are below the surface of the water when a reflection is rendered. Without this, you will actually have underwater objects rendered in the water reflection, and it will look wrong. Tiny floating point imprecision is responsible for the dark line on the horizon. This is unavoidable. The solution is to use the sky texture, and only use the material if you are placing blocks of sky in the scene. 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...
Olby Posted September 27, 2015 Author Share Posted September 27, 2015 I just stumbled upon this issue once again. I think it would help to restrict editor's Skybox file browser to .tex files only. I added a note to the API doc's entry on SetSkybox command. Quote Intel Core i7 Quad 2.3 Ghz, 8GB RAM, GeForce GT 630M 2GB, Windows 10 (x64) Link to comment Share on other sites More sharing options...
Josh Posted September 27, 2015 Share Posted September 27, 2015 I think we can eliminate the discard in the sky model shader. I mean you should not have skybox surfaces under water anyways. 1 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.