Search Unity

Custom cubemap with no rotation

Discussion in 'Shaders' started by MU-TH-UR, Nov 2, 2017.

  1. MU-TH-UR

    MU-TH-UR

    Joined:
    Aug 16, 2016
    Posts:
    20
    I have a TV monitor inside the cockpit of a ship. It's a rigidbody 6DOF kind. I would like to attach a specific cubemap reflection to the monitor that reflects all the emissive buttons and such and have it stay put. Right now just having a reflection probe, the reflections rotate in all degrees with the ship.

    Is there a way to do this?

    Thanks
     
  2. bgolus

    bgolus

    Joined:
    Dec 7, 2012
    Posts:
    12,352
    Yes, but it'll take some work. Basically you can't use the built in shaders at all and will have to write your shader almost entirely from scratch.

    Basically if you're asking the question if it's possible it means you're likely not that into shader writing already which means this will be a long road.


    The next best option would be to use a real time reflection probe.
     
    Hello-There-Dev likes this.
  3. MU-TH-UR

    MU-TH-UR

    Joined:
    Aug 16, 2016
    Posts:
    20
    Yeah, no go shader experience. I can get it to stay in place with no time slicing but that really lowers the frame rate. The other ones run better but rotate then snap back to position and on and on which looks really bad and this is also in VR.

    Thanks!
     
  4. bgolus

    bgolus

    Joined:
    Dec 7, 2012
    Posts:
    12,352
    Ah, yeah. Custom shader is really the only option here unfortunately. You may want to hire someone to do this for you depending on what you want / need. You might be able to get away with something as "simple" as a vertex / fragment shader that does nothing but reflect a cubemap and have it as an additive pass on top of whatever shader you're currently using for the screen (ie: a Standard shader with reflections turned off). You could also plausibly get this working as part of a surface shader.
     
    Hello-There-Dev likes this.