Per-pixel mesh entity-ID pass. Renders each EntityIdDraw's mesh with the given flat idColor (RGB encodes a stable entity id) into an offscreen target using the same viewProj, then reads it back to CPU. Pixels not covered by any entity are (0,0,0,0). Caller owns the returned ImageData*. Returns nullptr when the backend does not support offscreen ID capture. 更多...
#include <Graphics.h>
Public 属性 | |
| Mesh * | mesh = nullptr |
| glm::mat4 | model {1.f} |
| glm::vec4 | idColor {0.f, 0.f, 0.f, 1.f} |
详细描述
Per-pixel mesh entity-ID pass. Renders each EntityIdDraw's mesh with the given flat idColor (RGB encodes a stable entity id) into an offscreen target using the same viewProj, then reads it back to CPU. Pixels not covered by any entity are (0,0,0,0). Caller owns the returned ImageData*. Returns nullptr when the backend does not support offscreen ID capture.
在文件 Graphics.h 第 441 行定义.
类成员变量说明
◆ idColor
在文件 Graphics.h 第 444 行定义.
◆ mesh
| Mesh* eve::graphics::Graphics::EntityIdDraw::mesh = nullptr |
在文件 Graphics.h 第 442 行定义.
◆ model
| glm::mat4 eve::graphics::Graphics::EntityIdDraw::model {1.f} |
在文件 Graphics.h 第 443 行定义.
该结构体的文档由以下文件生成:
- src/modules/graphics/Graphics.h