From 4a5f0d44619663070de02787ac4f0545439d7e2c Mon Sep 17 00:00:00 2001 From: cosmonaut Date: Mon, 3 Aug 2020 18:30:55 -0700 Subject: [PATCH] add intermediate array to fix shader index select --- Effects/PBREffect.fx | 7 ++++++- Effects/PBREffect.fxb | Bin 37732 -> 38008 bytes 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/Effects/PBREffect.fx b/Effects/PBREffect.fx index 08fabd7..ee5ecb7 100644 --- a/Effects/PBREffect.fx +++ b/Effects/PBREffect.fx @@ -296,6 +296,11 @@ PixelShader PSArray[8] = compile ps_3_0 AlbedoMetallicRoughnessNormalMapPS() }; +int PSIndices[8] = +{ + 0, 1, 2, 3, 4, 5, 6, 7 +}; + int ShaderIndex = 0; Technique PBR @@ -303,6 +308,6 @@ Technique PBR Pass { VertexShader = compile vs_3_0 main_vs(); - PixelShader = (PSArray[ShaderIndex]); + PixelShader = (PSArray[PSIndices[ShaderIndex]]); } } diff --git a/Effects/PBREffect.fxb b/Effects/PBREffect.fxb index a4ca2d7cf6fe43feeab8564aee8983a09a57cc8c..97637627ab81ffc08b726b0604530721a4ea9bec 100644 GIT binary patch delta 464 zcmaE|jOoV;CRRqy|NkmBvL0vm`@zlt1{^?=5sEaGXpUT5VHa?8xVt(a{+Nc zuxDOMW^!sVkPT7?0va5X&#|X5%5FC0IL|1{0W?wtWGoaEK-nOZGbRgi35(hQMJ#}L zGE_wfkR7nul52ZQ{T!ewkotgN$D*RdN}wGPZvX!KGdPDhI>`XV`N8gsa06Kl;)C4F z1H>*sCP)md7f2@n@dF@c0*ZjNyaD1rK#Xwy>eV1wMj!;~fr81|to-#2_AoA#c0lDj zpz#~f_zTeZ2hjKrQ24