MCPcopy Create free account
hub / github.com/baldurk/renderdoc / BaseCoordFromMip

Function BaseCoordFromMip

qrenderdoc/Windows/TextureViewer.cpp:79–88  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

77}
78
79static inline uint32_t BaseCoordFromMip(uint32_t coord, const uint32_t mip, const uint32_t dim)
80{
81 const uint32_t mipDim = (dim >> mip) > 0 ? (dim >> mip) : 1;
82
83 // reverse of the above conversion
84
85 const float coordf = float(coord) / float(mipDim);
86
87 return uint32_t(dim * (coordf + 1e-6f));
88}
89
90static Descriptor MakeDescriptor(ResourceId res, Subresource sub = Subresource())
91{

Callers 4

GotoLocationMethod · 0.85
render_keyPressMethod · 0.85
BaseCoordFromMipMethod · 0.85
TextureViewer.cppFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected