Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 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 /
This question was closed Jul 19, 2019 at 01:10 PM by weltraumimport for the following reason:

The question is answered, right answer was accepted

avatar image
0
Question by weltraumimport · Dec 16, 2018 at 02:38 PM · unity 5shadersunlit

Make Unity Unlit Shader use normal maps.

Hey everyone, I've been trying to make a toon shader for a project of mine and wrote a Ramp Shader as Unity Unlit Shader. The Ramp is controlled by a fake Light object in the scene, so I wanted to try and add a normal map on top of the Main Texture and Ramp Texture but I have no idea how to approach this as Unity Unlit Shaders are... unlit and therefore are apparently not able to take normal maps? Any advice on that?

Comment
Add comment · Show 3
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 RobAnthem · Dec 16, 2018 at 02:42 PM 1
Share

That's not how that works. An unlit shader is specifically created without lighting information and a normal/bump map REQUIRES lighting information. There is no way to use a normal map without lighting, if you were to write a shader to accommodate for your custom light, you'd basically just be writing a lit shader. So a better question. Why do you think you need an unlit shader with a normal map?

avatar image weltraumimport RobAnthem · Dec 16, 2018 at 07:26 PM 0
Share

Thanks for the reply! It totally makes sense, I was thinking of that too but i wasn't sure if my guess was right so you basically confirmed it to me and i'm one step smarter. The reason I wanted the normal map in an Unlit Shader is because I'm only familiar with the struct, vert, frag, functions of the basic Unity Unlit Shader, so i'm not sure how to convert my functions into a LitShader. I will need the normal map to be on my 3D model though, so I was trying to think of a way to add these to my Ramp and Outliner functions in the Unlit.

avatar image Eno-Khaon RobAnthem · Dec 16, 2018 at 07:50 PM 1
Share

That's almost accurate.

You don't have to have lighting information to display a normal map if you're using the normals directly as color data.

In terms of the lighting scheme itself, however, a distance-driven fake light won't see any changes in distance from a normal map, so it won't provide any benefit in that case.

For a variety of examples of vertex/normal shaders, this is a handy place to start.

0 Replies

  • Sort: 

Follow this Question

Answers Answers and Comments

197 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 avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

How to store all vertex normals within a shader file 0 Answers

Custom shader with unlit textures is too bright 0 Answers

compute shader in order access of pixels 0 Answers

Unlit Shader with Shadows from point lights. 1 Answer

How to fInd World Coordinates of point visible at centre of screen/camera? 1 Answer


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