add/reduce texture stages at runtime?

Started by MichaelJPCT, May 19, 2017, 06:20:06 AM

Previous topic - Next topic

MichaelJPCT

i have a terrain with 3 tex stages, each with different UV scaling. it was created with textureInfo/polygonManager technique.
i found tex stages affect render speed - the more stages the slower, on a powerVR 544 gpu.
i wonder if i could reduce/add a tex stage(a noise tex in my case) depending on camera distance.
is there a way to do so?

AeroShark333

I think you could write something that generates noise in the fragment shader (which you can make dependant on the camera distance).

http://byteblacksmith.com/improvements-to-the-canonical-one-liner-glsl-rand-for-opengl-es-2-0/
I tried this one myself and it works fine on most devices (not all devices output the same though...)

MichaelJPCT

i think using shader is a good way, thanks.