Giles Goat<p>OK <a href="https://toot.wales/tags/DX12" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>DX12</span></a> <a href="https://toot.wales/tags/expert" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>expert</span></a> <a href="https://toot.wales/tags/shaders" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>shaders</span></a> <a href="https://toot.wales/tags/howto" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>howto</span></a> solve this .. you have an HLSL shader where you declare let's say FOR EXAMPLE</p><p>cbuffer Constants : register(b0)<br>{<br> float4 Banana;<br> float4x4 World;<br> float4 Pappine;<br>}</p><p>But then MAYBE later on you have an <a href="https://toot.wales/tags/ifdef" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>ifdef</span></a> /something that makes the shader NOT use "Banana" .. now the optimizator "would remove Banana from the cbuffer block" so now you'll have 16 bytes less in the structure but "how do you know when you load the shader" that is happened ? You see the shit.</p>