Before I used a samplerCube to render the cube
This is my previous fragmentShader code
"uniform samplerCube tCubeTgt;",
"varying vec3 posTgt;",
"void main() {",
"vec4 reflectedColorTgt = textureCube( tCubeTgt, vec3( -posTgt.x, posTgt.yz ) );",
"gl_FragColor = reflectedColorTgt ;",
"}"
Now I want to use 6 sampler2D to render a cube.
what should I do
Why?
In any case looking up how cube mapping works there's a function and table in the OpenGL ES 2.0 spec showing how cube mapping works
where sc, tc, and ma come from this table
Using that you can make functions that will apply the same logic using 6 2d textures instead of one cubemap
But you'll see there's lots of issues. One issue is what to do at the edge. The GPU can filter across edges? We'd have to add something to do that. Also we can't use random access for samplers nor can we conditionally access samplers which means doing it with 6 2d textures instead of one cubemap is going to be much much slower