we
    Preparing search index...

    Interface I_MaterialUniformTextureBundle

    CPU端TS程序中,材质中使用的uniform参数的bundle。目前PBR使用(todo,其他也可以使用,其他未实现)。 1、kind:uniform的种类 2、value:uniform的值 3、textureName:uniform绑定的texture的名称 4、textureChannel:uniform绑定的texture的通道 5、extra:uniform的值的额外数据 6、texture:uniform绑定的texture 7、sampler:uniform绑定的sampler 8、samplerBindingType:uniform绑定的sampler的绑定类型

    interface I_MaterialUniformTextureBundle {
        extra?: [number, number];
        kind: E_MaterialUniformKind;
        sampler?: GPUSampler;
        samplerBindingType?: GPUSamplerBindingType;
        texture?: BaseTexture;
        textureChannel: E_TextureChannel;
        textureName: E_TextureType;
        value: [number, number, number, number];
    }
    Index

    Properties

    extra?: [number, number]

    data1:f32,//自定义:alphaTest,intensity,scale, data2:i32,//自定义:

    种类

    sampler?: GPUSampler
    samplerBindingType?: GPUSamplerBindingType
    texture?: BaseTexture
    textureChannel: E_TextureChannel
    textureName: E_TextureType
    value: [number, number, number, number]

    uniform 的值, 1、只在kind=0时使用 2、按照textureChannel的代表的顺序使用 f32 使用 array[0] vec2 使用 array[0],array[1] vec3 使用 array[0],array[1],array[2] vec4 使用 array[0],array[1],array[2],array[3] 3、金属度、粗糙度、AO等只有一个数值的,使用array[0] 4、albedo 颜色贴图,使用array[0],array[1],array[2]

    5、备注: A、未使用的数据位置,可以复用,自定义(需要shader同步更改)