Closed gvissers closed 2 years ago
Well, looks like the third point above may be valid after all. I've created a pull request (#167), as I don't feel comfortable pushing this without further testing, but with these changes the water reflection is rendered properly over here, both in Windows/VirtualBox and in Linux/native.
I've noticed I get an "OpenGL invalid enumerant" error from the glCullFace(GL_NONE) statement in check_flip_fbo_texture(). Looks like GL_NONE is not a valid mode for the function. It still works but you may want to check.
I've noticed I get an "OpenGL invalid enumerant" error from the glCullFace(GL_NONE) statement in check_flip_fbo_texture().
And rightfully so. Now how did that end up in there? You'd just disable culling if you wanted to do that. Besides it's useless here, we only draw a single pixel, no faces involved. That's what you get for copying random code off of the internet, I suppose.
Fixed, thanks.
While the original problem referenced in the original problem description was easily fixed, there were three different problems that needed their own fixes as well, culminating in the creation of an entire new water shader. All known problems seem to be fixed and are in the latest release, so closing this.
I have been looking at problems with water reflection using Intel integrated graphics on Windows, see forum thread. I use an Intel HD 530 chipset on Linux without problems, but using Windows in Virtualbox I can see similar issues as described in the thread. I don't know which problems are due to Virtualbox, and which are due to Windows, but so far I have found:
~However, the GLSL implementation seems to have a problem with some assignment operations. For instance, the line that adds the noise displacement:~
~gives some very strange artefacts, whereas explicitly constructing a new vector~
~seems to work as it should. With this changed as well, I get a reflection in Windows that looks very similar to that in Linux. Which is a good thing because I was about to throw in the towel in frustration.~ That wasn't true, the issue is with the texture coordinates of the water tile. Investigating further.
I'll try to come up with a proper patch that detects if the texture is rendered upside down, but the last point will also require a new shader file to be distributed.