Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Oculus Cursor Shader Issue

Discussion in 'Shaders' started by tbr, Mar 9, 2016.

  1. tbr

    tbr

    Joined:
    Oct 23, 2015
    Posts:
    10
    Hi everyone!

    I've got what I hope is a quick question, I've been using a shader provided by Oculus for my cursor, it's been working great but I recently updated Unity to the latest 5.3.3 and the cursor isn't working the way it used to, well actually it works almost the same, the difference now is that the cursor is much darker than it used to be, but only when the project is built (for windows currently). Previously it was quite a strong red colour but now it a very dark red. Nothing I'm aware of has changed besides the update to 5.3.3.

    The shader code appears to be quite simple, so I hope it's a trivial issue I'm experiencing, I've posted the shader code below.

    Does anyone have any idea what the issue could be? Also with regards to shaders I know next to nothing so a little hand holding would be appreciated.

    Code (CSharp):
    1. Shader "Custom/Mobile/Particles/Alpha Blended AfterTrans" {
    2. Properties {
    3.     _MainTex ("Particle Texture", 2D) = "white" {}
    4. }
    5.  
    6. Category {
    7.     Tags { "Queue"="Transparent+10" "IgnoreProjector"="True" "RenderType"="Transparent" }
    8.     Blend SrcAlpha OneMinusSrcAlpha
    9.     Cull Off Lighting Off ZWrite Off Fog { Color (0,0,0,0) }
    10.  
    11.     BindChannels {
    12.         Bind "Color", color
    13.         Bind "Vertex", vertex
    14.         Bind "TexCoord", texcoord
    15.     }
    16.  
    17.     SubShader {
    18.         Pass {
    19.             SetTexture [_MainTex] {
    20.                 combine texture * primary
    21.             }
    22.         }
    23.     }
    24. }
    25. }
     
    Last edited: Mar 9, 2016