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

227
Vistas
¿Cuáles podrían ser algunas formas de falsificar la iluminación global en tiempo real a partir de una textura de renderizado emisivo?

Estoy tratando de hacer una sala de cine con una pantalla de reproductor de video, y dado que el soporte de Unity Enlighten está saliendo, estoy tratando de encontrar una alternativa. También esto es para auriculares móviles vr, por lo que el gi completo en tiempo real no es realmente la mejor opción de todos modos.

Esto es lo que tengo hasta ahora. Pero es muy básico y dado que Unity no admite luces de área en tiempo real, la luz realmente no se ve como si fuera de la pantalla.

¡Cualquier ayuda sería muy apreciada!

 using System.Collections; using System.Collections.Generic; using UnityEngine; public class ScreenLight : MonoBehaviour { public Light[] sLights; public Material[] materials; public RenderTexture rt; // Start is called before the first frame update void Start() { } // Update is called once per frame void Update() { // Remember currently active render texture RenderTexture currentActiveRT = RenderTexture.active; // Set the supplied RenderTexture as the active one RenderTexture.active = rt; // Create a new Texture2D and read the RenderTexture image into it Texture2D tex = new Texture2D(rt.width, rt.height); tex.ReadPixels(new Rect(0, 0, tex.width, tex.height), 0, 0); // Restore previously active render texture RenderTexture.active = currentActiveRT; var texColors = tex.GetPixels32(); var total = texColors.Length; var r = 0; var g = 0; var b = 0; for (var i = 0; i < total; i++) { r += texColors[i].r; g += texColors[i].g; b += texColors[i].b; } // Gets average texture color Color averageColor = new Color32((byte)(r / total), (byte)(g / total), (byte)(b / total), 0); // Updates lights and materials to the average texture color foreach (Material mat in materials) { mat.SetColor("_EmissionColor", averageColor); } foreach (Light l in sLights) { l.color = averageColor; } } }
over 4 years ago · Santiago Trujillo
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