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 jiteshvm · Feb 09, 2012 at 12:43 AM · shadershader-replacementvertexshader

How can I attach a vertex shader to the camera?

I am trying to write a shader that should modify the position of all the vertices rendered by the camera.

Comment
Add comment
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

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by Berenger · Feb 09, 2012 at 01:21 AM

I don't think that's possible. As far as I know, the object camera don't execute every shaders for every mesh. Instead, it gives the matrices to every shaders.

Maybe you want a post effect, some kind of distord ? Or render to texture, apply it on a plane in front of an other camera then modify the vertices of that plane ?

Comment
Add comment · Show 6 · Share
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 jiteshvm · Feb 09, 2012 at 01:27 AM 0
Share

I am trying to do head tracking using kinect. So i want to move all the vertices based on the head position.

avatar image Berenger · Feb 09, 2012 at 01:32 AM 0
Share

Isn't it simpler with bones ? $$anonymous$$inect control the bones, skinning control the mesh. I've never used $$anonymous$$inect, don't really know what people do in that case :/

avatar image Owen-Reynolds · Feb 09, 2012 at 01:38 AM 0
Share

The camera doesn't have any vertices, only actual models you can see in the scene have verts.

Camera stuff can usually be solved with things like transform.Lookat(eyesPlus); where eyesPlus is a Transform child of the headBone, maybe 20 meters in front of it.

avatar image jiteshvm · Feb 09, 2012 at 01:40 AM 0
Share

yes. its simpler to control the avatar/character using bones. I am trying an effect where if you move your head towards right, you could see the right side of the object. So i want to move all the other vertices that is rendered by the camera based on the head position.

avatar image Berenger · Feb 09, 2012 at 01:42 AM 0
Share

$$anonymous$$hhh, try with everything having a common parent, so you can rotate the entire scene ? Just rotate it around the head Y axis.

Show more comments

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

6 People are following this question.

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

Related Questions

How can i combine shaders? 0 Answers

Vertex Shader is Opaque on iPad and iPadMini 0 Answers

shadertoy to unity,Shadertoy to unity 0 Answers

replacing black n white range with color ( tri color shader)gradient mask 0 Answers

Shader: Add Refraction to Surface shader? 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