/// <summary>
        /// 为了正确可视化向量,必须在顶点着色器中正确计算worldPos,特别注意!
        /// </summary>
        /// <param name="data"></param>
        /// <param name="label"></param>
        /// <param name="debugInfoType"></param>
        /// <param name="visualizationColor"></param>
        protected void AddDebugInfo(float4 data, string label, debugger.DebugInfoType debugInfoType, float3 visualizationColor)
        {
            if (unit.isdiscard || debugData == null)
            {
                return;
            }

            debugger.DebugInfo debugInfo = new debugger.DebugInfo();
            debugInfo.label = label;
            debugInfo.data  = data;
            debugInfo.type  = debugInfoType;
            debugInfo.visualizationColor = visualizationColor;

            debugData.debugInfos.Add(debugInfo);
        }
 protected float4 tex2D(int sampler, float3 uv)
 {
     return(unit.samplers[sampler].getData(uv, unit));
 }
 protected float4 tex2D(int sampler, float3 uv, float lodbias)
 {
     return(unit.samplers[sampler].getData(uv, unit, lodbias));
 }
Exemple #4
0
 public float3x3(float3 r0, float3 r1, float3 r2)
 {
     row0 = r0; row1 = r1; row2 = r2;
 }