Very very close to pixel perfect shadows. Having some of that axis switch malarchy slowing things down

This commit is contained in:
MitchellHansen
2017-01-18 22:06:33 -08:00
parent ad2d5052de
commit 73026bc65d
7 changed files with 95 additions and 83 deletions

View File

@@ -61,6 +61,7 @@ public:
void draw(sf::RenderWindow* window) override;
int debug_quick_recompile();
void test_edit_viewport(int width, int height, float v_fov, float h_fov);
private:

View File

@@ -158,6 +158,10 @@ inline float AngleBetweenVectors(sf::Vector3f a, sf::Vector3f b){
return acos(DotProduct(a, b) / (Magnitude(a) * Magnitude(b)));
}
inline float DistanceBetweenPoints(sf::Vector3f a, sf::Vector3f b) {
return sqrt(DotProduct(a, b));
}
inline float DegreesToRadians(float in) {
return static_cast<float>(in * PI / 180.0f);
}