4#ifndef GREM_GRAPHICS_3D_CUBEMAP_3D_HPP
5#define GREM_GRAPHICS_3D_CUBEMAP_3D_HPP
74 1.0f, 0.0f, 0.0f, 0.0f,
75 0.0f, 1.0f, 0.0f, 0.0f,
76 0.0f, 0.0f, -1.0f, -1.0f,
77 0.0f, 0.0f, 0.0f, 0.0f,
83 vec3{1.0f, 0.0f, 0.0f},
84 vec3{-1.0f, 0.0f, 0.0f},
85 vec3{0.0f, -1.0f, 0.0f},
86 vec3{0.0f, 1.0f, 0.0f},
87 vec3{0.0f, 0.0f, 1.0f},
88 vec3{0.0f, 0.0f, -1.0f},
93 vec3{0.0f, -1.0f, 0.0f},
94 vec3{0.0f, -1.0f, 0.0f},
95 vec3{0.0f, 0.0f, -1.0f},
96 vec3{0.0f, 0.0f, 1.0f},
97 vec3{0.0f, -1.0f, 0.0f},
98 vec3{0.0f, -1.0f, 0.0f},
133 : mesh(device, MESH_VERTICES, MESH_INDICES) {}
graphics::Mesh< Vertex, Index > Mesh
Cubemap mesh primitive type.
Definition Cubemap3D.hpp:33
static Array< mat4, 6 > getSideViewMatrices(vec3 position) noexcept
Get an array of view matrices for rendering each side of an axis-aligned cubemap from its center at a...
Definition Cubemap3D.hpp:111
static constexpr mat4 SIDE_PROJECTION_MATRIX
Projection matrix for rendering a side of a cubemap from its center.
Definition Cubemap3D.hpp:72
const Mesh & getMesh() const noexcept
Get the cubemap mesh.
Definition Cubemap3D.hpp:140
static constexpr Array SIDE_FORWARD_DIRECTIONS
Camera forward directions for rendering each side of an axis-aligned cubemap.
Definition Cubemap3D.hpp:82
static constexpr VertexShaderConstants DEFAULT_VERTEX_SHADER_CONSTANTS
Default cubemap vertex shader constants.
Definition Cubemap3D.hpp:63
static constexpr Array SIDE_UP_DIRECTIONS
Camera up vectors for rendering each side of an axis-algined cubemap.
Definition Cubemap3D.hpp:92
UniformBuffer< PerspectiveParameters, "Cubemap3DPerspective"> PerspectiveBuffer
Shader buffer for cubemap perspective parameters.
Definition Cubemap3D.hpp:54
static constexpr ShaderPipelineOptions DEFAULT_SHADER_PIPELINE_OPTIONS
Default cubemap graphics pipeline configuration.
Definition Cubemap3D.hpp:66
graphics::ShaderPipeline< Mesh > ShaderPipeline
Shader pipeline for drawing cubemaps.
Definition Cubemap3D.hpp:60
graphics::VertexShader< Mesh, VertexShaderConstants, VertexShaderOutputs, PerspectiveBuffer > VertexShader
Default vertex shader for drawing cubemaps.
Definition Cubemap3D.hpp:57
Cubemap3D(Device &device)
Construct a unit cubemap.
Definition Cubemap3D.hpp:132
uint16_t Index
Data type used in the index buffer of a cubemap mesh.
Definition Cubemap3D.hpp:30
Persistent system managing the rendering context of a Window.
Definition Device.hpp:68
Generic abstraction of a GPU vertex array object and its associated buffers.
Definition Mesh.hpp:209
Linked GPU shader pipeline.
Definition shaders.hpp:1508
Compiled GPU vertex shader stage.
Definition shaders.hpp:1060
Definition buffer_layouts.hpp:20
@ NONE
Ignore the depth buffer.
Definition shaders.hpp:59
@ NONE
Ignore facing, don't cull primitives based on their winding order.
Definition shaders.hpp:319
vec< 4, float > vec4
Definition math.hpp:440
GREM_ALWAYS_INLINE mat< 4, 4, T > GREM_VECTORCALL lookAt(vec< 3, T > eye, vec< 3, T > target, vec< 3, T > up)
Definition math.hpp:2989
vec< 3, float > vec3
Definition math.hpp:439
mat< 4, 4, float > mat4
Definition math.hpp:806
Struct of fields output by the default fragment shader.
Definition Cubemap3D.hpp:44
vec4 outputColor
Final fragment color.
Definition Cubemap3D.hpp:45
Struct of shader parameters representing the perspective viewing the cubemap.
Definition Cubemap3D.hpp:49
mat4 cubemapViewProjectionMatrix
Combined view-projection matrix of the view perspective.
Definition Cubemap3D.hpp:50
Struct of default vertex shader constants.
Definition Cubemap3D.hpp:36
Struct of fields output by the default vertex shader.
Definition Cubemap3D.hpp:39
vec3 fragmentTextureCoordinates
Cube texture coordinates of the vertex.
Definition Cubemap3D.hpp:40
Data layout for the attributes of a single vertex of a cubemap mesh.
Definition Cubemap3D.hpp:25
vec3 vertexPosition
Position relative to the origin of the cube.
Definition Cubemap3D.hpp:26
Configuration of a graphics pipeline.
Definition shaders.hpp:428