Compositor脚本与类型

  我们先看下面一张基本的Compositor的脚本图:

Ogre Compositor解析

  上面就是一个Composition资源.在解析时,主要是使用CompositionPass, CompositionTargetPass, CompositionTechnique, Compositor,而在渲染时,使用RenderSystemOperation, TargetOperation, CompositorInstance, CompositionChain.管理Composition用CompositionManage.

Compositor主要类型说明.

CompositionPass:

  一次渲染环境设置,包含基本渲染设置,根据PassType不同,生成不同的RenderSystemOperation,主要有如下几种:RSClearOperation, RSStencilOperation, RSSetSchemeOperation, RSRestoreSchemeOperation, RSQuadOperation, RenderSystemOperation.下面以opengl的API举例.

  当PassType为PT_CLEAR,对应RSClearOperation,用到的属性为mClearBuffers, mClearColour, mClearDepth, mClearStencil.在opengl中,对应操作FFP的API是glClear(color|depth,stencil).

enum PassType
        {
            PT_CLEAR,           /// Clear target to one colour
            PT_STENCIL,         /// Set stencil operation
            PT_RENDERSCENE,     /// Render the scene or part of it
            PT_RENDERQUAD,      /// Render a full screen quad
            PT_RENDERCUSTOM     /// Render a custom sequence
        };
PassType

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-01-07
  • 2021-08-17
  • 2021-09-17
  • 2022-02-27
  • 2021-09-16
  • 2021-12-17
猜你喜欢
  • 2022-12-23
  • 2021-04-13
  • 2022-12-23
  • 2021-11-04
  • 2021-06-06
  • 2021-06-29
相关资源
相似解决方案