Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

287
Vistas
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 Respuestas
Responde la pregunta

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 Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda