Skip to content

miguel12345/UnityFlatShading

Repository files navigation

Flat Shading

Get a flat look with one click, without touching your mesh!

Features

  • Simple!
  • Uses surface shaders, so it supports all lightning stuff out of the box
  • Cross-platform
  • Easy to integrate it in your own surface shader

Motivation

If you create a cube in Unity, you'll get a mesh with 24 vertices, instead of the 8 you'd expect from a normal cube. The additional vertices are added to ensure that each triangle is made of up three vertices with the same normal.

The thing is that, in my case, I wanted to render some text per vertex without having to write extra ugly code to avoid repeated vertices, so I was looking for a solution that would give me a flat-looking cube without the need for extra vertices.

Usage instructions

The FlatShading component switches between the original material and the flat shading one.

About

Get a flat look for your models with one click, without touching your mesh!

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy