Search Unity

implicit cast from "float4" to "float3"

Discussion in 'Shaders' started by ohm, Oct 20, 2009.

  1. ohm

    ohm

    Joined:
    Aug 24, 2008
    Posts:
    88
    Hi,

    I get this "implicit cast from "float4" to "float3"" compiler warning pointing at a strange line.

    This line works fine:
    Code (csharp):
    1.  
    2. uv.x = (uv.x * cos(_UVRotation)) - (uv.y * sin(_UVRotation));   // rotate
    3.  
    when I do this change I get the compiler warning pointing at another line:
    Code (csharp):
    1.  
    2. uv.x = (uv.x * cos(_UVRotation2)) - (uv.y * sin(_UVRotation));  // rotate
    3.  

    thanks,
    //ohm
     
    DragonCoder likes this.
  2. Daniel_Brauer

    Daniel_Brauer

    Unity Technologies

    Joined:
    Aug 11, 2006
    Posts:
    3,355
    Can you post the rest of the shader? It's hard to see what you're changing without context.