Need help setting up global coordinates for water texture script


in the following file I need the water to use global texture coordinates. As you can see on the other plane with the ground texture the global coordinates work fine for that plane. But when I set the Coordinates for the water texture to global nothing happens.

I guess it is somehow overwritten by the scripts.

Does anyone know what is preventing this?

Thank you for your help!



Help-Texture.blend (1.52 MB)

No suggestions?

i dunno but works fine here (i see water) but if i zoom out its screwed up due to global coords so i uved it and set it to uv coords and now it looks nice as an ocean.

so what do you mean with “nothing happends”?


Help-Texture_uv version.blend (1.53 MB)

In your file the water still moves with the player.
I want to have the same result for the water texture as the one achieved on the ground texture. (While player moves, the texture “scrolls”)
This is usually done by using global coordinates (thx @sdfgeoff).
But it doesn’t work on the water-texture plane. I guess that it is overwritten by the water scripts somehow…

Any custom shader will overwrite (most of) the changes you make in the material/texture windows. My familiarity with GLSL isn’t enough to help unfortunately. There will be some way to get the global position inside the vertex shader, and then (I think) map that to TexCoord

The only thing i can do is telling you that everything works like you asked, but the water shader follows the camera not the player.
so it is scrolling. i have no idea how to change that, but you can parent the camera to the player that should be a work around for it.

i guess thats not something you want.