I keep encountering random shader compilation failures ([SM5] (): D3DCompile exception) when working on materials.
Random because the exact same material will successfully compile when I link nodes to their same source/destination after a few tries. This makes me waste a lot of time searching for bugs that don’t exist. I also have a few static switches, so building shaders isn’t cheap.
I can provide more details, or a video of what is happening.
I am now using 4.11, but this is not new. I encounter this problem since I started working with UE, in 4.8.
Check logs, look up Window->Devlopment Tools->Output Log, there might be more info what happens whoing up there
The log basically just say “[SM5] (): D3DCompile exception” unfortunately.
Any additional details would be really helpful. If you have a simple material setup that can reproduce this please post here.
Hi, here is a little video of the problem - YouTube . As you can see the material doesn’t compile properly at first, but works on the second try (and I was lucky there).
Unfortunately I can’t provide a simple material to reproduce this. But it happened several times on totally unrelated codes and different systems.
Can you upload the log here as well. I see the error in my log but only if I don’t have any hookups for the A or B input to the material. The log should include some of the issue that is happening and where to actually look to start resolving this.
You’ve also got what looks to be a more complex material setup here using different blend modes and whatnot based on the inputs available on the Material Attributes node. I would be really helpful to see the full material setup or have sample project that demonstrates this easily. If needed you can share privately but this is up to you ultimately.
The log only shows generic SM5 errors without details (ill post it next time it happen).
The project is relatively big, and most of the code is in C++. But I will try to provide something useful to you, no promise on the delay though.
It doesn’t need to be the full project, just something small with the material setup that I can replicate and see if there is a legitimate bug here or something with the material is throwing this error that is actually intended. At this moment it’s just a lot of guess-work without something more concrete to work from.
It is a little hard to provide you with something to reproduce out of the box since the actors are created dynamically in that project (in editor).
Here are the logs, and the C++ that setup the material.
Where can I send the material itself?
I’m taking a look at your function and everything seems in order but what exactly are the variables that you’re passing into the function, such as actorFloor?
Well it’s an actor that generate chunks on which the floors tiles are drawn on a canvas, to keep it simple P:
But I also had this problem on other unrelated actors with similar material creation (the video shows walls and objects too).
I didn’t encountered the problem this week, even through I didn’t touched that part of the code. But I will still try to provide a sample project that shows it, whenever I get the time.
We haven’t heard from you in a while, Nicolas. Have you had a chance to put together a sample project? In the meantime, I’ll be marking this issue as resolved for tracking purposes. Whenever you’re available, please let me know via a comment and the post will reopen.
I know that this is old but I am now getting this error. This started happening after I went from an Intel 4820k to an AMD Threadripper 1950x. I am curious now if the op was using a Ryzen CPU in his system since Threadripper is based on the Ryzen architecture.
Sorry to resurrect this post but seems relevant to me as I didn’t have this issue before switching from Intel to AMD.
We will likely not get a response from the original poster at this point, but if you would like us to look into this, I would suggest creating a new post in the Bug Reports section with reproduction steps for the issue, as well as logs from where the issue occurs.