forked from eden-emu/eden
Rasterizer: Implemented instanced rendering.
We keep track of the current instance and update an uniform in the shaders to let them know which instance they are. Instanced vertex arrays are not yet implemented.
This commit is contained in:
parent
3aad82b1a3
commit
c5284efd4f
7 changed files with 28 additions and 5 deletions
|
|
@ -638,6 +638,8 @@ public:
|
|||
union {
|
||||
u32 vertex_begin_gl;
|
||||
BitField<0, 16, PrimitiveTopology> topology;
|
||||
BitField<26, 1, u32> instance_next;
|
||||
BitField<27, 1, u32> instance_cont;
|
||||
};
|
||||
} draw;
|
||||
|
||||
|
|
@ -830,6 +832,7 @@ public:
|
|||
};
|
||||
|
||||
std::array<ShaderStageInfo, Regs::MaxShaderStage> shader_stages;
|
||||
u32 current_instance = 0; ///< Current instance to be used to simulate instanced rendering.
|
||||
};
|
||||
|
||||
State state{};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue