D3D:如何从 x,y 坐标获取颜色
D3D: How can i get color from a x,y coordinate?
如何通过 D3D 全屏程序从 x,y 坐标获取颜色类型?
我想确定 x,y 点是否为红色 255
提前谢谢。
由于您尚未指定DX版本,因此只有简短的分步算法
1) Render your scene to texture
2) Transfer tetxure back from GPU to CPU
3) Fill data from tetxure to memory buffer
5) Recalculate x, y to match tetxure resolution. Rendering window dimension can be different from DX device resolution (you can render smaller texture to bigger window and vice versa)
4) Do lookup at position [x,y]
如果您问如何从第三方DX程序获取像素颜色,则必须以某种方式获取应用程序的"屏幕截图"并在其中搜索颜色
相关文章:
- 如何在C++中获取坐标?
- 使用 GTK3 C++获取指针坐标
- 从 CGAL 3D 网格生成中获取顶点坐标的 -6.27744e+66:mesh_implicit_sphere示例
- 如何从 3d 对象文件中获取 3d 坐标
- 从 3 个视点在 3 张图像上有 3 个点如何在 3D 空间中获取其坐标?
- 如何从 DirectXTK (ToolKit) DirectX::Model 类获取所有顶点坐标以用于冲突检测
- 获取具有X,Y和距离的OPENCV中的3D坐标
- 获取QImage像素坐标
- OpenCV从2D像素获取3D坐标
- 如何通过调用 gluUnproject 两次(不使用 gluUnProject)从场景坐标中获取深度值
- 获取数独块的坐标
- 在调整大小窗口时,如何使用鼠标单击来获取图像的坐标
- 将圆圈分为n相等的部分,以获取每个分界点的坐标
- 从卫星的ECI坐标获取地球上的纬度和经度点
- Android NDK-如何从TAP中获取坐标并将其显示在文本视图上
- OpenGL获取离当前鼠标位置最近的世界三维点的三维坐标
- 当用户按 Ctrl 并单击时获取鼠标坐标
- 获取RGBDemo的鼠标位置坐标
- D3D:如何从 x,y 坐标获取颜色
- 在c++中通过坐标获取png