Skip to content

raylib.GenImageWhiteNoise

JoeStrout edited this page Apr 29, 2026 · 2 revisions

Generate image: white noise NOTE: It requires GetRandomValue(), defined in [rcore]

Parameters

Parameter Default Value Note
width 256
height 256
factor 0.5

Return value

Condition Return Value
(always) map

Notes

Example

// Generate a 128x128 white noise image (50% white pixels)
img = raylib.GenImageWhiteNoise(128, 128, 0.5)
tex = raylib.LoadTextureFromImage(img)
raylib.UnloadImage img
raylib.BeginDrawing
  raylib.ClearBackground raylib.BLACK
  raylib.DrawTexture tex, 0, 0, raylib.WHITE
raylib.EndDrawing
raylib.UnloadTexture tex

Clone this wiki locally