we
    Preparing search index...

    数据部分

    渲染参数

    系统参数:camera 或 light

    interface IV_DC {
        data: {
            indices?: T_indexAttribute;
            uniforms?: GPUBindGroup[] | T_uniformGroups[];
            unifromLayout?: GPUBindGroupLayout[] | T_BindGroupLayout[];
            vertexStepMode?: GPUVertexStepMode[];
            vertices?: { [key: string]: T_vsAttribute };
        };
        dynamic?: { fs?: boolean; vs?: boolean };
        IDS?: I_DrawCommandIDs;
        label: string;
        render: {
            depthStencil?: false | GPUDepthStencilState;
            drawMode?: T_drawMode;
            fragment?: {
                aliasName: string;
                code?: string;
                constants?: Record<string, number>;
                entryPoint: string;
                targets?: GPUColorTargetState[];
            };
            primitive?: GPUPrimitiveState;
            vertex: {
                code: string;
                constants?: Record<string, number>;
                entryPoint: string;
            };
            viewport?: I_viewport;
        };
        renderPassDescriptor?: GPURenderPassDescriptor;
        system?: {
            material?: I_DrawInputValueMaterial;
            MSAA?: T_rpdInfomationOfMSAA;
            parent?: BaseEntity;
            type: E_renderForDC;
        };
        transparent?: GPUBlendState[];
    }
    Index

    Properties

    data: {
        indices?: T_indexAttribute;
        uniforms?: GPUBindGroup[] | T_uniformGroups[];
        unifromLayout?: GPUBindGroupLayout[] | T_BindGroupLayout[];
        vertexStepMode?: GPUVertexStepMode[];
        vertices?: { [key: string]: T_vsAttribute };
    }

    Type Declaration

    • Optionalindices?: T_indexAttribute
    • Optionaluniforms?: GPUBindGroup[] | T_uniformGroups[]

      1、最多4个bind group; 2、如果有system,system的bindGroup是0,还剩3个; 3、entity的bindGroup占用bindGroup1的位置; 4、如果IV_DC,没有定义system,则uniform不考虑system的BindGroup的问题,即raw模式(NDC)

    • OptionalunifromLayout?: GPUBindGroupLayout[] | T_BindGroupLayout[]
    • OptionalvertexStepMode?: GPUVertexStepMode[]
    • Optionalvertices?: { [key: string]: T_vsAttribute }
    dynamic?: { fs?: boolean; vs?: boolean }

    Type Declaration

    • Optionalfs?: boolean

      是否包括动态资源在binding group中 默认:false, 如果true,则需要动态绑定资源

    • Optionalvs?: boolean

      动态更新vs属性 1、attribute的内容,数量不变,内容变化 2、attribute的内容的,数量变化。要求所有属性对应的数量必须相同。

    ID组,TT使用,用于获取entity的Blend参数

    label: string
    render: {
        depthStencil?: false | GPUDepthStencilState;
        drawMode?: T_drawMode;
        fragment?: {
            aliasName: string;
            code?: string;
            constants?: Record<string, number>;
            entryPoint: string;
            targets?: GPUColorTargetState[];
        };
        primitive?: GPUPrimitiveState;
        vertex: {
            code: string;
            constants?: Record<string, number>;
            entryPoint: string;
        };
        viewport?: I_viewport;
    }

    Type Declaration

    • OptionaldepthStencil?: false | GPUDepthStencilState

      是否开启深度测试和深度写入 不需要深度测试的(比如没有depth输出等的),需要设置为:false

    • OptionaldrawMode?: T_drawMode

      drawMode 1、DrawCommand,不需要,其drawMode数据由运行时的renderManager传递给DC。(DC均由entity产生) 2、BaseDrawCommand,需要,由于简单绘制,比如:quad,测试用例等。

    • Optionalfragment?: {
          aliasName: string;
          code?: string;
          constants?: Record<string, number>;
          entryPoint: string;
          targets?: GPUColorTargetState[];
      }

      无,则只有VS渲染

      • aliasName: string

        alias name of fragment shader

      • Optionalcode?: string

        未定义,则FS和VS代码共用

      • Optionalconstants?: Record<string, number>
      • entryPoint: string

        默认:"fs"

      • Optionaltargets?: GPUColorTargetState[]

        没有,则去scene中获取

    • Optionalprimitive?: GPUPrimitiveState
    • vertex: { code: string; constants?: Record<string, number>; entryPoint: string }
      • code: string

        shader模板

      • Optionalconstants?: Record<string, number>
      • entryPoint: string

        默认:"vs"

    • Optionalviewport?: I_viewport
    renderPassDescriptor?: GPURenderPassDescriptor

    渲染RPD描述符, 1、如果有同级别中的system存在,则按照camera或light,去scene中获取 2、如果没有system: A、若有本项,则使用 B、没有,则去scene中获取NDC的RPD

    system?: {
        material?: I_DrawInputValueMaterial;
        MSAA?: T_rpdInfomationOfMSAA;
        parent?: BaseEntity;
        type: E_renderForDC;
    }

    有system:摄像机或光源模式 没有system:NDC模式

    Type Declaration

    • Optionalmaterial?: I_DrawInputValueMaterial
    • OptionalMSAA?: T_rpdInfomationOfMSAA

      DC的UUID从renderManager运行时获取,可以不设置ID

    • Optionalparent?: BaseEntity

      DC的parent, 1、entity的bindGroup占用bindGroup1的位置; 2、如果存在parent,bindgroup和bindgrouplayout通过parent.getBindGroupAndBindGroupLayout()获取 2、如果没有父实体,则entity的bindGroup使用data中的uniform数据生成bindgroup;同时layout 通过cache获取

    • type: E_renderForDC
    transparent?: GPUBlendState[]

    是否透明渲染,包括alpha 透明,物理透明