Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
3
Question by hankthewhale · Sep 24, 2012 at 02:05 PM · shadergrayscalegreyscale

Desaturating scene while leaving selected object fully saturated

I'm have a script that allows me to select and object, center it to the screen, and free form rotate it with the mouse.

What I would like to do is desaturate the background and keep the selected object in color.

I did some searching and found some people were talking about redrawing the screen after applying the greyscale image effect to the main camera.

Also, there was some mention of using separate layers, one for a camera that renders the screen in grey scale and another that renders the screen in color. At any rate, I started messing around with it and it seemed like it was overly complicated for what I was trying to do.

Basically, I want the same functionally as the search feature in the hierarchy editor-side. To me it seems like I would use two separate shaders, one that desaturates objects, and another that displays objects in full color, then animate between the two of them when selecting an object. Would this be the best way to handle it? Has anyone else done something similar to what I'm doing? Any help would be appreciated.

EDIT: Additionally, our end result is going to load up objects into the scene via xml so keeping this as generic as possible would be a plus.

Comment
Add comment · Show 2
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image whydoidoit · Sep 24, 2012 at 03:09 PM 0
Share

If you use two shaders then all of your materials have to use those shaders - that might be a bit limiting mightn't it? I guess you could swap in the grayscale shader to the materials and then swap it back afterwards. Using 2 cameras would work for all shaders but I'm thinking you would have a depth issue as items rendered in colour would appear in front of all other items.

avatar image hankthewhale · Sep 24, 2012 at 04:11 PM 0
Share

Having the colorized objects rendered in front would not be an issue as they are brought to the foreground when clicked on. So technically speaking, do you think rendering the scene with two cameras would be a smaller hit in performance vs swapping shaders?

0 Replies

· Add your reply
  • Sort: 

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

10 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

How do I access the 'Shader' property of the Greyscale Effect? 1 Answer

Why does this shader make my 2D sprites disappear if they are rotated 180 degrees? Also, pixel snap? 3 Answers

grayscale shader on iOS turns black 1 Answer

2D Greyscale shader with lighting and color. 1 Answer

GrayscaleEffect shader broken in 3.5? 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges