Search Unity

Unity roadmap blog post said:

Currently Unity mixes the fixed function pipeline for vertex lit objects and vertex shaders for pixel lit lights. On Direct3D this creates some rendering artifacts on very close or self intersecting surfaces. We want to end this by implementing a full fixed function emulator in vertex shaders. You won’t have to do anything, it will just work!

Well, the good news is that we have done it, and it is definitely coming in Unity 2.6!

It is funny, because the problem seems like a simple one: «there are double-lighting artifacts on close surfaces». The solution, however, is «we need to implement whole fixed function pipeline manually», which involves combining shader assembly fragments, doing register allocations, packing vertex pipeline state into bits and other low level hacking.

In other words, it required quite a bit of thinking and implementation effort, so I decided to write up a technical report on how we solved it. If you’re a graphics programmer or love programmer speak or just have nothing better to do: here’s the report.

4 replies on “Fixed function T&L in vertex shaders: implemented”

I read the article but I am not a programmer so I understood only half of it :P However, it sure is interesting and I am happy to see that you fixed the issue.

unity staff and users must be more than happy because they have you!

Do you optimize your code later for future versions?

Do you know what approaches other engines have for this problem???

Comments are closed.