Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Bug / Crash  Reflections appear in play mode but not in build
#9
Have been testing the build in 2 computers: the one in which it works and the one in which it doesn't. In the one that works, I've enabled the Frame debugger in the editor, and took a look at the contents of the specular probe during fluid rendering. It looks ok:

[Image: Zk51Gst.png]

When remotely connecting the frame debugger to a development build in the computer where reflections don't work, I found that the reflection probe isn't bound to the shader at all, so when the shader reads from it, it gets pitch black as a result:

[Image: r5jGQn5.png]

Looks like Unity sometimes evicts the reflection probe after rendering the skybox. Not sure about the meaning of "sometimes" here, though. Its' also really strange that this behavior depends on the specific machine where the build is running.

Obi's fluid shader reads unity_SpecCube0, which according to Unity's documentation is the correct way to access the default specular probe. I'm reporting this as a bug to Unity. Reflection probes should either be available until the end of the frame, or if they're not available under certain circumstances, these should be documented.

In the meantime if your fluid rendering depends on reflections, I can write a custom fluid shader for you that accepts a cube map as input for reflections. Not as good as using the built-in reflections, but should get the job done.

kind regards,
Reply


Messages In This Thread
RE: Reflections appear in play mode but not in build - by josemendez - 02-09-2022, 12:36 PM