Unravel Engine C++ Reference
Loading...
Searching...
No Matches
atmospheric_pass_skybox.h
Go to the documentation of this file.
1#pragma once
2
5
10
11namespace unravel
12{
13
15{
16public:
21 bool init(rtti::context& ctx);
22
23 // Run after geometry
24 void run(gfx::frame_buffer::ptr target, const camera& cam, gfx::render_view& rview, delta_t dt, const run_params& params);
25
26private:
27 struct skybox_program : uniforms_cache
28 {
29 void cache_uniforms()
30 {
31 // Typically the sampler is named something like s_texCube
32 cache_uniform(program.get(), u_texCube, "s_texCube", gfx::uniform_type::Sampler);
33 }
34
36 std::unique_ptr<gpu_program> program;
37 } program_;
38
39 // A simple inside-out cube
40 std::unique_ptr<gfx::vertex_buffer> vb_;
41 std::unique_ptr<gfx::index_buffer> ib_;
42};
43} // namespace unravel
void run(gfx::frame_buffer::ptr target, const camera &cam, gfx::render_view &rview, delta_t dt, const run_params &params)
Class representing a camera. Contains functionality for manipulating and updating a camera....
Definition camera.h:35
std::chrono::duration< float > delta_t
Represents a handle to an asset, providing access and management functions.
std::shared_ptr< uniform > uniform_ptr
Definition program.h:19
Structure for caching uniforms.
void cache_uniform(gpu_program *program, gfx::program::uniform_ptr &uniform, const hpp::string_view &name, gfx::uniform_type type, uint16_t num=1)
Caches a uniform in the GPU program.