zoukankan      html  css  js  c++  java
  • Context3D的setProgramConstantsFromMatrix使用时需注意的事项

    setProgramConstantsFromMatrix()

    public function setProgramConstantsFromMatrix(programType:String, firstRegister:int, matrix:Matrix3D, transposedMatrix:Boolean = false):void

    Sets constants for use by shader programs using values stored in a Matrix3D.

    Use this function to pass a matrix to a shader program. The function sets 4 constant registers used by the vertex or fragment program. The matrix is assigned to registers row by row. The first constant register is assigned the top row of the matrix. You can set 128 registers for a vertex program and 28 for a fragment program.

    Parameters

      programType:String — The type of shader program, either Context3DProgramType.VERTEX or Context3DProgramType.FRAGMENT.
     
      firstRegister:int — the index of the first constant register to set. Since a Matrix3D has 16 values, four registers are set.
     
      matrix:Matrix3D — the matrix containing the constant values.
     
      transposedMatrix:Boolean (default = false) — if true the matrix entries are copied to registers in transposed order. The default value is false.

  • 相关阅读:
    ByteBuffer使用实例
    Fiddler抓包显示请求时延
    手机wifi连上Fiddler后无网络问题解决
    git
    git
    Autofac使用
    Redis实战
    Redis实战
    Redis实战
    Redis实战
  • 原文地址:https://www.cnblogs.com/hisiqi/p/3161878.html
Copyright © 2011-2022 走看看