d3d_set_shading

Set whether to use smooth shading or not.

Syntax:

d3d_set_shading(smooth)


Argument Description
enable Turn smooth shading on (default: true) or off (false).


Returns: N/A


Description

When using lighting, for each vertex of a polygon the colour is determined, then the colour of internal pixels is based on the colour of these vertexes. There are two ways this can be done: Either the whole polygon gets the same colour, or the colour is smoothly interpolated over the polygon. By default smooth shading is used, but that behaviour can be changed using this function.

NOTE: This is a Windows only function, and should not be used on any other target platform.


Example:

d3d_set_shading(true);

The above code switches off smooth shading for the 3D scene.


Back: 3D Drawing
Next: d3d_light_define_direction
© Copyright YoYo Games Ltd. 2018 All Rights Reserved