Use https://renderdoc.org/ and check and compare frames for both your working and non-working example That'll give you an idea at what could be wrong I suspect you have a typo in one of your definition I'll try to take a look later