blob: e0aa6da71138aba8864ce929cef0a47e4d1ffe09 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
// This file is part of the 64k demo project.
// It declares Hybrid3DEffect (simplified v2 port).
// TODO: Full Renderer3D integration with Scene/Camera
#pragma once
#include "3d/camera.h"
#include "3d/renderer.h"
#include "3d/scene.h"
#include "gpu/effect.h"
class Hybrid3D : public Effect {
public:
Hybrid3D(const GpuContext& ctx, const std::vector<std::string>& inputs,
const std::vector<std::string>& outputs, float start_time,
float end_time);
~Hybrid3D() override;
void declare_nodes(NodeRegistry& registry) override;
void render(WGPUCommandEncoder encoder, const UniformsSequenceParams& params,
NodeRegistry& nodes) override;
private:
Renderer3D renderer_;
Scene scene_;
Camera camera_;
bool initialized_ = false;
std::string depth_node_;
WGPUTexture dummy_texture_;
WGPUTextureView dummy_texture_view_;
};
|