Jump to content

Search the Community

Showing results for tags 'flat'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Welcome to UNIGINE Forums
    • News & Announcements
    • Getting started
  • Development
    • Content Creation
    • World Design
    • Rendering
    • Animation
    • Physics, Navigation and Path Finding
    • UI Systems
    • Sound & Video
    • Editor
    • C++ Programming
    • C# Programming
    • Networking
    • Sim IG (Image Generator)
    • VR Discussions
    • General
  • Improving UNIGINE
    • Documentation
    • Feedback for UNIGINE team
    • Bug Reports
    • Unigine SDK Beta feedback
  • Community
    • Add-on Store (https://store.unigine.com/)
    • Showcase
    • Collaboration
    • Tools, Plugins, Materials & Tutorials
    • General Discussions
  • Legacy
    • UnigineScript

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Found 1 result

  1. How would I go about implementing a "flat shaded" mesh material? By flat shading, I mean the mesh should be subject to world lighting, however triangles should be rendered as if all pixel normals are set to the face normal (e.g. for a retro-graphics look with hard-edged triangles). The "brute force" method of achieving this is to duplicate all vertices in the mesh, such that no vertices are shared. Then the three normals for each triangle can be set to the face normal by taking the cross-product of two of the edges. This is not ideal however, since it results in redundant vertex data. How would I implement this using a material? I thought it might be possible to calculate per-vertex face normals using a geometry shader, but I can't get this to play nicely with mesh_base. Is there some sample material or shader code that does this? Many thanks
×
×
  • Create New...