tsl-textures

TSL Textures

Stars

This texture renders a sky with stars. Click on a snapshot to open it online.

Code example

import { stars } from "tsl-textures/stars.js";

model.material.colorNode = stars ( {
	scale: 2,
	density: 2,
	variation: 0,
	color: new THREE.Color(16774640),
	background: new THREE.Color(96),
	seed: 0
} );

Parameters

Darker stars color reduces the amount of visible stars, same like reduction in density. Hue variation is noticeable when the color of stars is not pure neutral (i.e. white or black).

Online generator

online/stars.html

Source

src/stars.js

Home