I am creating a 2D game using openGL and I would like to add some water in it.
I have a very little understanding of OpenGL yet so many questions about it but I will do my best to keep things simple and clear.
So basically I have two textures : the water texture and a perlin noise texture. What I would like to do is to alterate the positions at which OpenGL look into the water texture using values of the perlin noise texture.
so basically something like :
looping trough all pixels to draw on screen for the water quad
{
texel_coordinate = glMagic();
texel_offsetXY = perlinNoise_texture[pixel_coordinate].redValue(); // Or .intensity().... idk
glSetTexelCoordinatesToUseIsteadOfWhatOpenGLIntentedAtFirst(
texel_coordinate.X + texel_offsetXY, texel_coordinate.Y + texel_offsetXY)
{
// keep looping for all the pixels to draw
...and all that, without using a shading language (GLSL).
is it possible ?
is it stupid ?
is it extremely computer intensive? (if it is possible of course)
is there a shader technique that is widely supported trough all computer between now and 2000 or does all GLSL are just as bad on the compatibility issue (if you never experience any compatibility issue with GLSL, this question isn't for you).
PS : I don't want to start a debate on what people think of how many computer they know support GLSL. I just want to know if it's possible & viable to draw water with a texel displacement effect without the use of GLSL.