Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
LoneWandererProductions committed Jan 28, 2025
1 parent 56cf7c8 commit 782dc59
Showing 1 changed file with 45 additions and 0 deletions.
45 changes: 45 additions & 0 deletions RenderEngine/SkyboxRender.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
using System;
using System.Drawing;
using System.Windows.Media.Media3D;

namespace RenderEngine
{
Expand Down Expand Up @@ -34,5 +36,48 @@ bool IsCellVisible(WorldCamera camera, int row, int col)
// Perform visibility check based on the camera's FOV and cell position
return true; // Placeholder logic
}

//TODO pseudo code

//Bitmap RenderSkybox(Camera camera, Skybox skybox, int width, int height)
//{
// Bitmap frame = new Bitmap(width, height);

// using (Graphics g = Graphics.FromImage(frame))
// {
// g.Clear(Color.Black); // Clear background

// foreach (var cell in skybox.GetVisibleCells(camera))
// {
// // Transform and project the cell into screen space
// var screenRect = ProjectCellToScreen(cell, camera, width, height);

// // Draw the cell's texture, blending edges if necessary
// g.DrawImage(cell.Texture, screenRect);
// }
// }

// return frame;
//}

//Bitmap CompositeFrame(Camera camera, Raycaster raycaster, Skybox skybox, int width, int height)
//{
// // Render the skybox
// Bitmap skyboxFrame = RenderSkybox(camera, skybox, width, height);

// // Render the raycaster's output
// Bitmap raycasterFrame = raycaster.Render(camera, width, height);

// // Combine the two frames
// Bitmap finalFrame = new Bitmap(width, height);
// using (Graphics g = Graphics.FromImage(finalFrame))
// {
// g.DrawImage(skyboxFrame, 0, 0); // Draw skybox first
// g.DrawImage(raycasterFrame, 0, 0); // Overlay raycaster output
// }

// return finalFrame;
//}

}
}

0 comments on commit 782dc59

Please sign in to comment.