Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

201
Visualizações
Reduce Tiling within Perlin Noise Texture

With the code below I am generating a canvas full of noise. I would like this noise to be resolution agnostic. (appear visually the same at all resolutions) - The code below provides this, but the noise which is pulled from Rune Madsens's Noise seems to tile.

Can anyone suggest a way that I might make it less of an obvious repeating pattern, yet still keep it looking the same at all resolutions.

let grain_index = 0;
let grain_scale = 0.0025;

for (let ypos = 0; ypos < rd.canvas.height; ypos++) 
{
    for (let xpos = 0; xpos < rd.canvas.width; xpos++) 
    {
        let samplex = xpos  / (rd.canvas.height * grain_scale);
        let sampley = ypos  / (rd.canvas.width  * grain_scale);
        let samplez = 0;

        let lum = rd.noise.get(samplex, sampley, samplez) * 255;

        grain_imagedata[grain_index + 0] = lum;
        grain_imagedata[grain_index + 1] = lum;
        grain_imagedata[grain_index + 2] = lum;
        grain_imagedata[grain_index + 3] = 96;
        
        grain_index += 4;
    }
}

Output from the above code - Noise appears tiled

about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda