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

Issue with vertex manipulation inside my vertex shader of my unlit shader code? Get the following er

Discussion in 'Scripting' started by frozenmangotree, Jul 12, 2021.

  1. frozenmangotree

    frozenmangotree

    Joined:
    May 2, 2020
    Posts:
    14
    I'm just using a basic plane object defaulted with unity, but I see she imports her own custom tessellated object which has a channel of uv0 on it. I can tell because when she clicks on her object to inspect it and show you the tesselation count, a uv0 shows as well. So my question is how do I import a model with a custom uv0 channel for vertex manipulation inside the vertex shader of my unlit shader script? For more detail on the exact issue I'm running into in the actual code I attatched the following link:
    3:01:52mins on Shader Basics, Blending & Textures • Shaders for Game Devs [Part 1] - YouTube
    So on that time frame is where Freya does it, she uses v.uv0.y on line 52. However when I do the same I get the following error: 'invalid subscript 'uv0' at line 52.'

    What am I missing here? thanks guys.
     
  2. GroZZleR

    GroZZleR

    Joined:
    Feb 1, 2015
    Posts:
    3,201
    Hard to say without seeing your shader code, but you must have forgot to declare it as part of your vertex struct.