From c56538e66d68eda2a3883f61cfb15451515ea31c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Branimir=20Karad=C5=BEi=C4=87?= Date: Mon, 24 Oct 2016 17:34:52 -0700 Subject: [PATCH] Fixed example-31-rsm. --- examples/31-rsm/fs_rsm_combine.sc | 6 +++++- .../runtime/shaders/essl/fs_rsm_combine.bin | Bin 7922 -> 7970 bytes .../runtime/shaders/glsl/fs_rsm_combine.bin | Bin 7517 -> 7565 bytes 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/examples/31-rsm/fs_rsm_combine.sc b/examples/31-rsm/fs_rsm_combine.sc index af4f5fc23..ae684960e 100644 --- a/examples/31-rsm/fs_rsm_combine.sc +++ b/examples/31-rsm/fs_rsm_combine.sc @@ -115,7 +115,11 @@ void main() vec2 texelSize = vec2_splat(u_shadowDimsInv.x); shadowCoord.xy /= shadowCoord.w; - shadowCoord.xy = shadowCoord.xy*0.5+0.5; + shadowCoord.xy = shadowCoord.xy*0.5 + 0.5; + +#if BGFX_SHADER_LANGUAGE_GLSL + shadowCoord.z = shadowCoord.z*0.5 + 0.5; +#endif // BGFX_SHADER_LANGUAGE_GLSL float visibility = PCF(s_shadowMap, shadowCoord, shadowMapBias, texelSize); diff --git a/examples/runtime/shaders/essl/fs_rsm_combine.bin b/examples/runtime/shaders/essl/fs_rsm_combine.bin index 23364eb50e39782abbb199a065aacfa367afd04a..5567c79446bf6f1864a679edf97c16954b391681 100644 GIT binary patch delta 48 zcmexlyU1?BI>!8s>mym@iZc>Z^2?p`^NUjA4fU!NY!x&#N^%Rz5{u$3^r|+0WBDTq E0Mxw_wg3PC delta 17 ZcmZ2v_sMp`I!61A>myk)oVRr9pkNy>p58DiZc>Z^2?p`^NUjA4fU!NY!x&#N^%Rz5{u$3^r|*5W!WJC E0MA1b3IG5A delta 17 ZcmeCRzH2pM9pkEv>p569KWAAc0RTtv2ax~(