texture() cannot load zfile
Status: Beta
Brought to you by:
render_man
Pixie crashes if a shader uses texture() to load a zfile depth image to retrieve depth data. This technique is often used in REYES style hacking to fake soft shadows, sub surface scattering and other object blocking related tricks.
While building a test case for this error I've discovered that I think the problem is when the same map is loaded by a shadow() call and texture() call at the same time in an illuminate loop in a light shader. If you comment out one or the other in the shader it will pass.
I haven't fixed this bug but did some investigation. It looks like pixie loads in a texture or shadow the first time you issue a texture or shadow call in your shader. From that point it considers that file to be a shadow or texture. If another statement calls the opposite function with the same filename, it will crash because it re-interprets it as a different data structure.
The fix will need some refactoring presumably.