Search Unity

CubeMap problem

Discussion in 'Shaders' started by skyrick, Jan 22, 2014.

  1. skyrick

    skyrick

    Joined:
    Feb 2, 2013
    Posts:
    21
    Hi,

    I generate a cubemap with the renderCubeWizard here : http://docs.unity3d.com/Documentation/ScriptReference/Camera.RenderToCubemap.html

    My cubemap is well generated but I've a problem : when I apply this CubeMap in a Shader with a Reflective/VertexLit, and apply this Shader to a sphere : the reflection follow my camera (I see always the same image of my reflection in the sphere).

    How to do for I've a reel reflection comportment ?


    Ps : I hope I'm clear, maybe I must post a print screen ? :/
     
  2. imaginaryhuman

    imaginaryhuman

    Joined:
    Mar 21, 2010
    Posts:
    5,834
    Hm... the sphere remains stationary and you move around it? The cube map should normally be aligned to the sphere's local position/rotation, right?
     
  3. skyrick

    skyrick

    Joined:
    Feb 2, 2013
    Posts:
    21
    I make screenshots to show you :)
     
    Last edited: Jan 23, 2014
  4. skyrick

    skyrick

    Joined:
    Feb 2, 2013
    Posts:
    21
    Some screenshots to show you what I mean :

    $CaptureCubeMapFacingCameraInterface.png

    $CaptureCubeMapFacingCamera.png

    For me the only good comportement is this :
     

    Attached Files:

    Last edited: Jan 23, 2014
  5. Reanimate_L

    Reanimate_L

    Joined:
    Oct 10, 2009
    Posts:
    2,788
    Weird reflective vertex lit works fine here....
    it look's like somehow your world reflection vector is broken or there's something that messing with it...
     
    Last edited: Jan 23, 2014
  6. skyrick

    skyrick

    Joined:
    Feb 2, 2013
    Posts:
    21
    How to you fix that ?
    Create a new project from zero ?
     
  7. skyrick

    skyrick

    Joined:
    Feb 2, 2013
    Posts:
    21
    Wow ! You're right !
    I tried the same thing in a new project, and it's work !

    But now ... how to fix that in my "BAD project" ? :(

    (ps: the "bad project" use SVN ... maybe that ...)

    EDIT : it's definitely a DirectX 11 problem, deactivate it in the player settings seem to fix the problem (and crash my scene ...)
     
    Last edited: Jan 29, 2014