rendertexture calculations