This scalar shader returns a random value between 0 and 1. The node picks a random number for each instances where the material (with random scalar shader) is used.

This can be used for “Switch BSDF” to create a pseudo-random distribution of a list of bsdfs on different instances.

If it is used in different material, it’s recommanded to change the seed for each call.

## Parameters¶

name

type

description

seed

integer

The seed for pseudo-random value generator (between 0 and 255)

## Ocean XML 6.1 example¶

<scalarshader type="random" name="switch" seed="64"/>