Closed natevm closed 6 years ago
That blue is the default clear color for the irradiance and prefiltered cube map generation passes, so something goes wrong in these.
It's working for for me on Intel, but that's on Linux.
Can you run this with validation enabled and check for any errors? Maybe the driver doesn't support all required formats.
I ran with validation layers on, and I did get a couple error messages but they're just related to cleanup:
ERROR: [ObjectTracker] Code 614466292 : OBJ ERROR : For device 0x1a89bb59828, DeviceMemory object 0x21 has not been destroyed. The spec valid usage text states 'All child objects created on device must have been destroyed prior to destroying device' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkDestroyDevice-device-00378) ERROR: [ObjectTracker] Code 614466292 : OBJ ERROR : For device 0x1a89bb59828, Image object 0x20 has not been destroyed. The spec valid usage text states 'All child objects created on device must have been destroyed prior to destroying device' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkDestroyDevice-device-00378) ERROR: [ObjectTracker] Code 614466292 : OBJ ERROR : For device 0x1a89bb59828, ImageView object 0x24 has not been destroyed. The spec valid usage text states 'All child objects created on device must have been destroyed prior to destroying device' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkDestroyDevice-device-00378) ERROR: [ObjectTracker] Code 614466292 : OBJ ERROR : For device 0x1a89bb59828, Pipeline object 0xa9 has not been destroyed. The spec valid usage text states 'All child objects created on device must have been destroyed prior to destroying device' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkDestroyDevice-device-00378) ERROR: [ObjectTracker] Code 614466292 : OBJ ERROR : For device 0x1a89bb59828, Sampler object 0x23 has not been destroyed. The spec valid usage text states 'All child objects created on device must have been destroyed prior to destroying device' (https://www.khronos.org/registry/vulkan/specs/1.0/html/vkspec.html#VUID-vkDestroyDevice-device-00378)
I can run the pbrbasic target from your other examples alright:
...But the results from running pbribl don't seem right:
Validation layer outputs an error this time: ERROR: [SC] Code 5 : SPIR-V module not valid: Expected vector sizes of Result Type and the condition to be equal: Select Generating BRDF LUT took 226.765 ms Generating irradiance cube with 7 mip levels took 93.0566 ms ERROR: [SC] Code 5 : SPIR-V module not valid: Expected vector sizes of Result Type and the condition to be equal: Select Generating pre-filtered enivornment cube with 10 mip levels took 34.56 ms
Same bluish tint appears on the gun model in your pbrtexture target:
I also get the same validation errors in the pbrtexture target.
The validation layer throws the error when loading the genbrdflut fragment shader on line 579 of pbribl.cpp. I tried recompiling the shaders with the reference compiler (one that comes with 1.0.68.0), but I get the same error. Maybe it's a validation layer/compiler bug?
Will take a look at the SPIR-V validation layer message, it's possible that one of the functions e.g. returns a float instead of a vector.
Since this is working fine for me with an Intel iGPU on Linux this may be a Windows related driver bug.
The blueish tint in the pbr samples from my example repo seems to be exactly the same problem. The difference is that these don't display the pre-filtered cube map in the background so it's not as visible as in the pbr sample.
I was able to get the validation layer message to go away by recompiling prefilterenvmap.frag. Still getting the weird blue on intel + windows. Nvidia + windows seems to work with all the above samples though.
I mentioned the bug on Intel's graphics bug reporting forms. Hopefully we can get a response over there.
https://software.intel.com/en-us/forums/graphics-driver-bug-reporting/topic/758149#
Hey Sascha,
For some reason, I can't get your PBR examples to work on my intel graphics. The scene ends up looking like this:
Any ideas what might be going on?
Thanks!