microsoft / microsoft/MixedReality-GraphicsTools-Unity
Box projection for reflection probes
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- C#
- Sterne
- 209
- Forks
- 49
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
Original issue: https://github.com/microsoft/MixedRealityToolkit-Unity/issues/9150
Describe the problem
Box projection doesn't seem to work on the MRTK standard shaders, which causes really bad reflective surfaces for head mounted displays (especially in rooms)
Describe the solution you'd like
Enable box projection for reflection probes to work with the MRTK standard shader
Describe alternatives you've considered
Writing some custom shader
Additional context
the MRTK/Standard shader does not account for box projection (or reflection probe blending). We should call this out in the docs.
To properly support box projection we need to introduce a call to the
BoxProjectedCubemapDirectionmethod within UnityStandardUtils. There is a great example of the changes need on this page: https://catlikecoding.com/unity/tutorials/rendering/part-8/
Thanks @Cameron-Micka I tweaked the shader so the worldReflection parameter reads as follows:
float3 worldReflection = BoxProjectedCubemapDirection(reflect(incident, worldNormal), i.worldPosition, unity_SpecCube0_ProbePosition, unity_SpecCube0_BoxMin, unity_SpecCube0_BoxMax);I didn't add blending as I didn't need it (yet), so this does the trick so far
Beitragsleitfaden
Für dieses Repository ist kein Beitragsleitfaden indexiert
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Beginne damit, den MRTK standard shader und seine Verwendung von UnityStandardUtils zu lokalisieren, und vergleiche anschließend den Pfad für Reflection Probes mit dem im Issue verlinkten Beispiel BoxProjectedCubemapDirection. Als abgeschlossen gilt die Aufgabe, wenn die Box-Projektion für Reflection Probes im MRTK standard shader funktioniert und das relevante Shader-Verhalten auf reflektierenden Oberflächen verifiziert wurde.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- unity
- Bereich
- computer-graphics
- Issue-Typ
- Bug
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 35/100