Sprite sheets, atlases, game UI, time of day, weather presets, headless captures
- BillboardInstance: per-instance uv sub-rect, feet anchor, turn, dithered alpha, flash; BillboardBatch::sharedTexture; Texture createEmpty/update/cellUV/cellAnchor/nearest - SpriteAtlas: fixed-cell runtime atlas with gutters - hd2d::ui: Octopath-style panels, fonts (Cinzel, EB Garamond), dialogue box with typewriter + portraits + choices, menus, nameplates, toasts, ImGui theme - DayCycle (dawn/day/dusk/night keyframes, sun + moon arcs), Weather overcast/mist/ lightning, night-aware presets, stars and moon in the sky - Hidden-window offscreen captures (Window visible=false, Renderer output FBO, OffscreenTarget); --screenshot never opens a window - Camera::worldToScreen; CMake usable via add_subdirectory (HD2D_BUILD_DEMO, HD2D_ENGINE_ASSET_DIR)
This commit is contained in:
@@ -19,6 +19,10 @@ struct Camera {
|
||||
glm::vec3 right() const; // horizontal right vector
|
||||
glm::mat4 view() const;
|
||||
glm::mat4 projection(float aspect) const;
|
||||
// Projects `world` to window pixels (top-left origin) of a `viewportPx`
|
||||
// viewport, using view() and projection(viewportPx.x / viewportPx.y).
|
||||
// Returns false (outPx untouched) when the point is behind the camera.
|
||||
bool worldToScreen(const glm::vec3& world, glm::vec2 viewportPx, glm::vec2& outPx) const;
|
||||
};
|
||||
|
||||
} // namespace hd2d
|
||||
|
||||
Reference in New Issue
Block a user