Skip to content

Search

Kembali
· 2 menit baca

Wireframes, dots and blend modes

A drawable takes a wireframe, a dot on every vertex and a depth test switch, and a 2D one a blend mode.

A 3D or 2D drawable can draw its triangle edges and its vertices beside its surface, and a 2D one picks how it blends.

A sphere with a yellow wireframe, a sphere with a cyan dot on every vertex, a torus drawn as wireframe only, and a box behind the wall drawn over it

  • wireframe_width draws every triangle edge in wireframe_color, and dot_size a dot on every vertex in dot_color. screen sizing counts pixels; world thins with distance.
  • draw_surface = false leaves only the wireframe and the dots. A skinned mesh draws neither, and WebGL2 has no line or point pass.
  • depth_test = false draws a node over everything drawn before it, as the box behind the wall shows. receive_shadows = false lights it as if nothing stood in the way.
  • blend_mode on a 2D drawable is alpha, premultiplied, add, multiply, screen or opaque; auto follows the texture.
  • A light2d of kind = "spot" throws a cone its node's rotation aims, between inner_angle_degrees and outer_angle_degrees.

An added and a multiplied triangle under a spot light, the right one with a dot on each corner

[nodes.shape3d]
kind = "torus"
draw_surface = false
wireframe_width = 1.5
wireframe_sizing = "screen"