There we go! The raycaster now has a camera that renders without distortion and can be pitched, yawed, and moved on the XYZ axis. I'm not sure now if I want to: Add lighting, improve performance, or start working on porting it to OpenCL
This commit is contained in:
@@ -6,8 +6,8 @@
|
||||
#include "RayCaster.h"
|
||||
#include <Map.h>
|
||||
|
||||
const int WINDOW_X = 400;
|
||||
const int WINDOW_Y = 400;
|
||||
const int WINDOW_X = 600;
|
||||
const int WINDOW_Y = 600;
|
||||
|
||||
|
||||
float elap_time(){
|
||||
@@ -52,7 +52,7 @@ int main() {
|
||||
window_sprite.setPosition(0, 0);
|
||||
|
||||
// State values
|
||||
sf::Vector3i map_dim(100, 100, 100);
|
||||
sf::Vector3i map_dim(200, 200, 200);
|
||||
sf::Vector2i view_res(WINDOW_X, WINDOW_Y);
|
||||
sf::Vector3f cam_dir(1.0f, 0.0f, 1.57f);
|
||||
sf::Vector3f cam_pos(50, 50, 50);
|
||||
|
||||
Reference in New Issue
Block a user