nxdk_pgraph_tests
A collection of tests for the Xbox nv2a graphics processor
 
Loading...
Searching...
No Matches
perspective_vertex_shader.h
1#ifndef NXDK_PGRAPH_TESTS_SHADERS_PERSPECTIVE_VERTEX_SHADER_H_
2#define NXDK_PGRAPH_TESTS_SHADERS_PERSPECTIVE_VERTEX_SHADER_H_
3
4#include <cmath>
5#include <cstdint>
6
7#include "projection_vertex_shader.h"
8
10 public:
11 PerspectiveVertexShader(uint32_t framebuffer_width, uint32_t framebuffer_height, float z_min = 0,
12 float z_max = 0x7FFF, float fov_y = M_PI * 0.25f, float near = 1.0f, float far = 10.0f);
13
14 inline void SetNear(float val) { near_ = val; }
15 inline void SetFar(float val) { far_ = val; }
16
17 protected:
18 void CalculateProjectionMatrix() override;
19
20 private:
21 float fov_y_;
22 float aspect_ratio_;
23 float near_{0.0f};
24 float far_{100.0f};
25};
26
27#endif // NXDK_PGRAPH_TESTS_SHADERS_PERSPECTIVE_VERTEX_SHADER_H_
Definition perspective_vertex_shader.h:9
Definition projection_vertex_shader.h:11