blob: 795037461dd5be020eb3d9e6f07dd6becf1417f7 (
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
32
|
// 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);
~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_;
};
|