normalmap

package
v0.0.0-...-2e4101f Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2017 License: Zlib Imports: 5 Imported by: 0

Documentation

Overview

A Component for working with Normal-Maps.

Index

Constants

View Source
const (
	SF_Sobel3x3 = SourceFilter(iota)
	SF_Prewitt3x3
	SF_Scharr3x3
)

Variables

This section is empty.

Functions

func CreateGeneratorJob

func CreateGeneratorJob(dst NormalSink, src *image.Gray16, f SourceFilter, scaleFactor float64) copier.Operator

Creates a Job, that generates a Normal-Map from a Height-Map using an operator such as Sobel. It returns a nil-Pointer on failure, (if illegal arguments are given).

Use copier.Operate(Operator,image.Rectangle) to perform the job.

The parameter scaleFactor is the weight of the Height-Map. The default value should be 1.0 !

func NewStackingJob

func NewStackingJob(dst NormalSink, src ...NormalSource) copier.Operator

Creates a Job, that stacks multiple Normal-Maps above each other.

Use copier.Operate(Operator,image.Rectangle) to perform the job.

Types

type NormalSink

type NormalSink interface {
	SetNormal64(x, y int, c vgimage.Normal64)
	SetNormal(x, y int, c vgimage.Normal)
}

type NormalSource

type NormalSource interface {
	Normal64At(x, y int) vgimage.Normal64
	NormalAt(x, y int) vgimage.Normal
}

type SourceFilter

type SourceFilter uint32

Jump to

Keyboard shortcuts

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