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

283
Visualizações
Three js RectAreaLight on MeshPhongMaterial no light reflection (OES_texture_half_float not supported)

I want to add RectAreaLight to a three.js scene where I placed object with MeshPhongMaterial however there is no light reflection on the objects. I found a working example here: Link

You can see the source code when you open the developer tools.

So I tried to port it to React and the scene renders all objects but there is light reflection. In line 46 the OES_texture_half_float error was thrown. I commented this lines out. Maybe it has something to do with this.

Here is the not working codesandbox: Link

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

0

There are a couple of issues in your code:

  • You have to import RectAreaLightUniformsLib and call its init() method.
  • As mentioned in the documentation, RectAreaLight only supports PBR materials (meaning MeshStandardMaterial and MeshPhysicalMaterial).
  • There is also no shadow support yet so setting flags like castShadow and receiveShadow won't have any effect.

Fixed codesandbox: https://codesandbox.io/s/restless-cherry-4jh72

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