Implement 2D #31

Open
opened 2024-10-30 19:16:17 +00:00 by SeanOMik · 1 comment
Owner

Currently, the engine is only 3D. I want to implement 2D since its easier to make art for, and I am no artist lmao. The renderer graph is hard coded by the BasicRenderer::new() function, I need to add a way to get the renderer and manually create the graph. This would make it more versatile and I could maybe create something like Renderer2DPlugin that constructs the render graph for 2D.

Currently, the engine is only 3D. I want to implement 2D since its easier to make art for, and I am no artist lmao. The renderer graph is hard coded by the `BasicRenderer::new()` function, I need to add a way to get the renderer and manually create the graph. This would make it more versatile and I could maybe create something like `Renderer2DPlugin` that constructs the render graph for 2D.
SeanOMik added the
Kind/Feature
Priority
High
labels 2024-10-30 19:16:17 +00:00
Author
Owner

I got a 2D sprite rendering!
image
Its an egg from a free sprite pack I found on itch.io.

Since the Sprite rendering code is just a node in the render graph, I didn't have to do anything special to render 3d (the cube) at the same time.

Sprites are massive though since the dimensions of the images are used to create the quad, meaning that 1 pixel is the same as 1 unit. The cube in the above screenshot is a 1x1x1 cube, so each pixel in the egg texture is the size of the cube.

The camera movement when its projection is orthographic doesn't work very well at all. I need to take a look at that.

I got a 2D sprite rendering! ![image](/attachments/47ce61c3-ab66-4794-b36a-295d58faf22a) Its an egg from a [free sprite pack I found on itch.io](https://cupnooble.itch.io/sprout-lands-asset-pack). Since the Sprite rendering code is just a node in the render graph, I didn't have to do anything special to render 3d (the cube) at the same time. Sprites are massive though since the dimensions of the images are used to create the quad, meaning that 1 pixel is the same as 1 unit. The cube in the above screenshot is a 1x1x1 cube, so each pixel in the egg texture is the size of the cube. The camera movement when its projection is orthographic doesn't work very well at all. I need to take a look at that.
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: SeanOMik/lyra-engine#31
No description provided.