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:
@@ -10,7 +10,7 @@ public:
|
||||
list[i] = 0;
|
||||
}
|
||||
|
||||
for (int i = 50; i < 52; i++) {
|
||||
for (int i = 51; i < 52; i++) {
|
||||
list[55 + dim.x * (55 + dim.z * i)] = 1;
|
||||
}
|
||||
|
||||
|
||||
@@ -37,7 +37,7 @@ private:
|
||||
sf::Vector3<float> camera_position;
|
||||
|
||||
// The distance in units the view plane is from the iris point
|
||||
int view_plane_distance = 300;
|
||||
int view_plane_distance = 200;
|
||||
|
||||
// Precalculated values for the view plane rays
|
||||
sf::Vector3f *view_plane_vectors;
|
||||
|
||||
Reference in New Issue
Block a user