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 Jan 15, 2016 at 12:11 AM by HellsPlumber for the following reason:

The question is answered, right answer was accepted

avatar image
0
Question by HellsPlumber · Jan 03, 2016 at 01:03 PM · shadertextureshadersvectorsmoothing

Smoothing pixels via Shader / Tree Leaf Shader

Hi! I was hoping for some help regarding shaders.

Being able to paint surfaces is the main feature of our game. We do this by giving each level 2 textures, "MainTex" and "PaintTex" which we combine using a custom shader. The MainTex is the level textures, while the PaintTex is a transparent texture that our weapons can paint onto.

The problem is that we need to keep the resolutions of PaintTex low for performance reasons, which makes the paint look noticably pixelated as you can see here: alt text

However, we're able to dramatically reduce texture resolution AND eliminate the pixel-problem by using Unity's "Nature/Tree Soft Occlusion Leaves" shader and using it's Alpha Cutoff setting. With this shader we're able to use tiny pixel art textures and let the shader smooth it out to produce results like this: alt text

Sadly by using this shader we lose all of the features of our custom shader such as bump-map mixing. I was hoping to add this smoothing functionality from the Tree Leaves shader to my existing shader but I don't know where to start.

Does anybody know how to accomplish this? Thanks for any help!

TL/DR: Does anyone know how to make a shader that smooths pixels like the inbuilt Leaves shader?

b69525e059e725c4717c2e79e3f6a4ba1.png (162.5 kB)
e80c8e7aa73b9309230cb8ca100d560b1.png (212.2 kB)
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 HellsPlumber · Jan 04, 2016 at 09:20 AM 0
Share

Sorry to bump but I'm really struggling with this and can't move on with development until I've solved this. If this is against the rules I'll withdraw this comment.

1 Reply

  • Sort: 
avatar image
1
Best Answer

Answer by cjdev · Jan 05, 2016 at 01:52 AM

Unity actually distributes the source for their shaders, the download is just not exactly advertised. You can go to "Get Unity" > "Free Download" > "Windows" > "For Windows" > "Built in shaders". The one you're looking for is under "\DefaultResourcesExtra\Nature\SoftOcclusion". It's a pretty simple shader so I don't think you'll have much trouble integrating it with your own.

Comment
Add comment · Show 1 · 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 HellsPlumber · Jan 14, 2016 at 11:16 PM 0
Share

Thankyou for your help. Sadly Unity Answers didn't let me know I'd had a reply. After a bit of searching I found the shader sources and have accomplished what I needed to.

If I'd have been notified I would have saved a lot of time! Thanks again!

Follow this Question

Answers Answers and Comments

50 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

Related Questions

CRT/LCD screen shader (for materials) 4 Answers

Combining 2 black-white textures 2 Answers

Are shaders more efficient than manual pixel replacement? 0 Answers

Rendering Depth Texture 0 Answers

How to use a shader to write to a mipmap (partial mipmap update) 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