PDA

View Full Version : Access single Textures of a (rendered)Cubemap



alfalfasprossen
08-19-2010, 12:32 AM
Hey guys,

is there a way to access, use and edit the single textures of a cubemap? I am rendering a cubemap dynamically via FBOs. It seems that i need to mirror some of the faces, so i need to bind them(?), how do i do that? And i want to use the single textures as standalone textures to display a cube-map-cross with all the 6 textures on it. I think it should be possible to directly edit and use the textures of the cubemap, but i didn't find anything that explains how to.

can anyone help?

Alfonse Reinheart
08-19-2010, 02:57 AM
It seems that i need to mirror some of the faces, so i need to bind them(?), how do i do that?

Are you talking about binding for the purpose of reading the texture in a shader, or attaching the texture to an FBO? You can attach individual faces of a cubemap to an FBO, but you cannot bind individual faces to the shader.

However, you can just bind the whole cubemap and read only the texels you want. You have to deal with cubemap math, which is a bit complex, but that's about it.

alfalfasprossen
08-19-2010, 03:47 AM
Are you talking about binding for the purpose of reading the texture in a shader, or attaching the texture to an FBO? You can attach individual faces of a cubemap to an FBO, but you cannot bind individual faces to the shader.
generally attaching them to a shader to render each of them on a plane, so i can see a flat representation of my cubemap.
AND for the purpose of mirroring them. It looks as some of my rendered cubemap-faces are kind of flipped?


However, you can just bind the whole cubemap and read only the texels you want. You have to deal with cubemap math, which is a bit complex, but that's about it.
but i can't attach those pixels to a shader? so i would need to make a copy of them to be able to render the 6 textures of the cubemap? I mean... its kind of a waste of space isn't it?