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
0
Question by idurvesh · Sep 20, 2014 at 10:40 AM · shadershaderswatershaderlabtransparent shader

make masked object transparant

Hi,

I am using unity water and want to use depth mask on object which will be basically half in the water and half above water with use of depth mask I want it to show above water .

I know depth mask require one object which will not let camera render anything behind it after it gets render.

So I have set up water, I added its render queue to 3000, then I added my prefab on water which will be half in the water, and set its render queue to 1500, and then I created material,created game object added that material on newly created game object, then finally added depth shader provided here in unity wiki to that material and set its render queue to 1800.

It works perfectly as I wanted, but the thing is the masked object (on which I used depth masked shader) do not get transparant, it gets the color set in camera setting > background i.e., default blue color

What I want is it should get transparent not that default blue color to it...I tried to modify that depth mask shader and added alpha bending to it but then the object which has masked shader gets disappear completely and with that the camera do not render the object which is half in the water too...

Anyone know how to do it? plz help em ,I'm stuck here from days...

Comment
Add comment · Show 1
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 Adam-Buckner ♦♦ · Sep 22, 2014 at 08:00 AM 0
Share

I'll see if I can get someone who knows shaders better than I do to respond, but you may also want to dig thru this (very long) thread on making water. There are a number of variations that people have tried over time, which do include solutions to the problem you have: http://forum.unity3d.com/threads/wanted-ocean-shader.16540/

And there are some links here: http://wiki.unity3d.com/index.php/Ocean_Shader_Project

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

3 People are following this question.

avatar image avatar image avatar image

Related Questions

Custom water shader and SSR 0 Answers

Help me understand stencil shader logic 1 Answer

Local position in vertex shader? 1 Answer

Addition to Standard Shader stopping it from batching? 0 Answers

Flat Shading / No Vertex Interpolation 2 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