Waterfall test of escher in fuchsia

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.

architecture

0x2 Waterfall execution flow

Waterfall is the demo of how echer is running.

Here is the draw main loop of Waterfall.

  1. Create objects in scene, place them into Model

  2. Create shadow through DrawFrameWithMomentShadowMapShadows

  3. Draw objects with shadow in PaperRenderer

main loop

Here is the sequence diagram of creating shadowmap

  1. DrawShadowPass of ShadowMapRenderer is entrypoint for drawing shadow

  2. Create CreateDisplayList in ModelRenderer

  3. ModelRenderer call GetPipeline to create or reuse pipeline

  4. It will call SPIR-V compiler if need to create a new pipeline

create shadowmap

Here is the sequence diagram of drawing objects with shadowmap

  1. Call DrawFrameWithMomentShadowMapShadows

  2. Create CreateDisplayList in ModelRenderer

  3. Draw each item in ModelRenderer::Draw()

  4. Do following operations in command buffer

    vk_command_buffer.bindPipeline()

    vk_command_buffer.setStencilReference()

    vk_command_buffer.bindDescriptorSets()

  5. Call CommandBuffer::DrawMesh() to draw mesh,it will bind vertex data and index data(similar as OpenGL ES)

    commandbuffer.bindVertexBuffers()

    commandbuffer.bindIndexBuffer()

    commandbuffer.drawIndexed()

draw frame

0x3 Waterfall snapshot

Here are snapshots when Waterfall is running.

waterfall_2

waterfall_3

waterfall_4

waterfall_5

waterfall_8