Quantcast
Channel: GameDev.net
Viewing all articles
Browse latest Browse all 17825

Casting a cubemap to be used as 6 separate 2d texture srvs

$
0
0
I was wondering if it is possible to use individual faces of cubemap for creating 2D srvs. So the underlying ID3D12Resource will be the cubemap but we can also access it as 6 separate 2d textures in shader code. ID3D12Resource* pCubeMap = createCubeMap(); SRV cubeMapFace1 = {}; cubeMapFace1.dimension = 2D; cubeMapFace1.xxx = 0; // This will be the face index (is this the plane slice field in D3D12_TEX2D_SRV? How does it map to Vulkan since there is no plane slice in VkImageViewCreateInfo) // Plan is to create an srv for only the first face of the cubemap and use it as a normal 2D texture in shader code createSRV(pCubeMap, &cubeMapFace1); Thank you

Viewing all articles
Browse latest Browse all 17825

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>