0x1 Escher Introduction
Escher is physical rendering engine in fuchsia os
It aims to support Mixed Reality(MR), MR will mix virtual 3D objects with reality world.
It only supports vulkan as its rendering backend.
Here is the escher’s architecture view.
0x2 Waterfall execution flow
Waterfall is the demo of how echer is running.
Here is the draw main loop of Waterfall.
Create objects in scene, place them into Model
Create shadow through DrawFrameWithMomentShadowMapShadows
Draw objects with shadow in PaperRenderer
Here is the sequence diagram of creating shadowmap
DrawShadowPass of ShadowMapRenderer is entrypoint for drawing shadow
Create CreateDisplayList in ModelRenderer
ModelRenderer call GetPipeline to create or reuse pipeline
It will call SPIR-V compiler if need to create a new pipeline
Here is the sequence diagram of drawing objects with shadowmap
Call DrawFrameWithMomentShadowMapShadows
Create CreateDisplayList in ModelRenderer
Draw each item in ModelRenderer::Draw()
Do following operations in command buffer
vk_command_buffer.bindPipeline()
vk_command_buffer.setStencilReference()
vk_command_buffer.bindDescriptorSets()
Call CommandBuffer::DrawMesh() to draw mesh,it will bind vertex data and index data(similar as OpenGL ES)
commandbuffer.bindVertexBuffers()
commandbuffer.bindIndexBuffer()
commandbuffer.drawIndexed()
0x3 Waterfall snapshot
Here are snapshots when Waterfall is running.