smooth_shading

command
v0.4.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 1, 2024 License: BSD-2-Clause Imports: 4 Imported by: 0

README

smooth_shading

In this example, we create a low-polygon icosphere and render it with both smooth and flat shading. We also turn text labels "Flat Shading" and "Phong Shading" into 3D meshes, and render these below each sphere with the same shading method as the accompanying sphere.

Here is the final rendering:

Rendering of a sphere with both flat (left) and smooth (right) shading

As can be seen in this rendering, Phong shading hides the polygonal surface of the sphere except around the edges, where an outline of the original low-polygon icosphere is still clearly visible. This is because shading can only affect pixels that actually intersect the surface.

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL