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

168
Visualizações
My Perlin noise script doesn't interpolate right

I'm trying to make a Perlin noise function, but the interpolation doesn't work right. I hoped that switching the different dot products at the interpolation would work, but it doesn't. I also tested if my interpolation function works and it looks likes it does work.

My script is at: https://codepen.io/Koen124/pen/WNZyMdj?editors=0010

    var x10 = x - Math.floor(x); // x10 is between 0 and 1
    var y10 = y - Math.floor(y); // y10 is between 0 and 1
      
    // topleft && topright
    var upInterpolate = (vec_dot[0]*cosInterp(x10))+(vec_dot[1]*(1-cosInterp(x10)));
      
    // bottomleft && bottomright
    var downInterpolate = (vec_dot[2]*cosInterp(x10))+(vec_dot[3]*(1-cosInterp(x10)));

    var final = (upInterpolate*cosInterp(y10))+(downInterpolate*(1-cosInterp(y10)));

I first tried my Perlin noise script with only 4 vectors which you can see here: https://codepen.io/Koen124/pen/GRMGrEM?editors=0010

The interpolation test is at: https://codepen.io/Koen124/pen/ExwRMgB?editors=0010

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

I've already solved it. I had to flip the bottom left and bottom right dot products

about 4 years ago · Juan Pablo Isaza Relatório
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