normals

package
v0.34.0 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2025 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Fill

func Fill(img draw.Image)

func FromHeightmap

func FromHeightmap(heightmap texturing.Texture[float64], scale float64) texturing.Texture[vector3.Float64]

func ToNormalmap added in v0.33.0

func ToNormalmap(normals texturing.Texture[vector3.Float64]) image.Image

Types

type Direction

type Direction int
const (
	Additive Direction = iota
	Subtractive
)

type HeightmapFromImageNode added in v0.33.0

type HeightmapFromImageNode struct {
	In    nodes.Output[image.Image]
	Scale nodes.Output[float64]
}

func (HeightmapFromImageNode) Out added in v0.33.0

type Line

type Line struct {
	Start           vector2.Float64
	End             vector2.Float64
	Width           float64
	NormalDirection Direction
}

func (Line) Dir

func (l Line) Dir() vector2.Float64

Dir is end point - starting point

func (Line) Round

func (l Line) Round(src draw.Image)

type Sphere

type Sphere struct {
	Center    vector2.Float64
	Radius    float64
	Direction Direction
}

func (Sphere) Draw

func (s Sphere) Draw(src draw.Image)

type TextureFromHeightmapNode added in v0.33.0

type TextureFromHeightmapNode struct {
	In    nodes.Output[texturing.Texture[float64]]
	Scale nodes.Output[float64]
}

func (TextureFromHeightmapNode) Image added in v0.33.0

func (TextureFromHeightmapNode) Texture added in v0.33.0

type ToNormalMapNode added in v0.33.0

type ToNormalMapNode struct {
	Normals nodes.Output[texturing.Texture[vector3.Float64]]
}

func (ToNormalMapNode) NormalMap added in v0.33.0

func (n ToNormalMapNode) NormalMap(out *nodes.StructOutput[image.Image])

Jump to

Keyboard shortcuts

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