zoukankan      html  css  js  c++  java
  • 三维物体遮挡

    DepthMask shader即可实现不显示,但是可以遮挡其他三维物体的作用

    //===============================================================================
    //Copyright (c) 2015 PTC Inc. All Rights Reserved.
    //
    //Confidential and Proprietary - Protected under copyright and other laws.
    //Vuforia is a trademark of PTC Inc., registered in the United States and other
    //countries.
    //===============================================================================
    //===============================================================================
    //Copyright (c) 2010-2014 Qualcomm Connected Experiences, Inc.
    //All Rights Reserved.
    //Confidential and Proprietary - Qualcomm Connected Experiences, Inc.
    //===============================================================================
    
    Shader "DepthMask" {
    
        SubShader{
            // Render the mask after regular geometry, but before masked geometry and
            // transparent things.
    
            Tags {"Queue" = "Geometry-10" }
    
            // Turn off lighting, because it's expensive and the thing is supposed to be
            // invisible anyway.
    
            Lighting Off
    
            // Draw into the depth buffer in the usual way.  This is probably the default,
            // but it doesn't hurt to be explicit.
    
            ZTest LEqual
            ZWrite On
    
            // Don't draw anything into the RGBA channels. This is an undocumented
            // argument to ColorMask which lets us avoid writing to anything except
            // the depth buffer.
    
            ColorMask 0
    
            // Do nothing specific in the pass:
    
            Pass {}
        }
    }
  • 相关阅读:
    OpenCV中的霍夫线变换和霍夫圆变换
    霍夫圆变换
    异或的性质及运用
    不用中间变量交换两个数值变量的值
    图像变换
    STM32程序的启动
    RAM与FLASH
    STM8的AIR与STM32的Keil的指定地址存数据
    HEX与ASCII之间装换
    STM32、Cortex-A、Cortex-R、Cortex-M、SecurCore
  • 原文地址:https://www.cnblogs.com/llstart-new0201/p/9945865.html
Copyright © 2011-2022 走看看