• 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
1
Question by derPuppeteer · Apr 01, 2014 at 09:27 PM · shadingflat

Change Shademode to get Data from one provoking vertex

I really need the good old Shadermode = Flat in Unity in order to reduce my vertexcount by a factor of 3. Is there any way (no dx11 pls) to get data from a single provoking vertex?

Some information about what I am talking about: Nvidia.com Shademode Flat Shading explanation

Thank you!

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 laurentlavigne · Jun 14, 2016 at 05:51 AM

The closer I got to, which doesn't work on mac is

 Shader "Flattener" {
     SubShader {
         Pass {
             GLSLPROGRAM
 
             #extension GL_EXT_gpu_shader4 : require
             flat varying vec4 color;
 
             #ifdef VERTEX
             void main()
             {
                 color = gl_Color;
                 gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;
             }
             #endif
 
             #ifdef FRAGMENT
             void main()
             {
                 gl_FragColor = color; // set the output fragment color
             }
             #endif
 
             ENDGLSL
         }
     }
 }



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

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.

Welcome to Unity Answers

The best place to ask and answer questions about development with Unity.

To help users navigate the site we have posted a site navigation guide.

If you are a new user to Unity Answers, check out our FAQ for more information.

Make sure to check out our Knowledge Base for commonly asked Unity questions.

If you are a moderator, see our Moderator Guidelines page.

We are making improvements to UA, see the list of changes.



Follow this Question

Answers Answers and Comments

21 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

Related Questions

Flat shading procedural generated mesh? 1 Answer

Can terrain detail meshes have basic shading applied? 1 Answer

Is there a flat shading option 1 Answer

Colliding 2 completely flat quads with physics? 5 Answers

Werid Looking Models when Importing to Unity 3D 1 Answer

  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges