From cd3ef3e7132c321a609473a4bfeb3b415494c64e Mon Sep 17 00:00:00 2001 From: Sascha Willems Date: Mon, 1 Apr 2019 20:45:42 +0200 Subject: [PATCH] Enabled shader clip distance feature (validation) Regenerated shaders with current glslang compiler --- data/shaders/offscreen/mirror.frag.spv | Bin 2732 -> 2660 bytes data/shaders/offscreen/mirror.vert | 5 ----- data/shaders/offscreen/mirror.vert.spv | Bin 1384 -> 1516 bytes data/shaders/offscreen/phong.frag.spv | Bin 2020 -> 1948 bytes data/shaders/offscreen/phong.vert | 6 ------ data/shaders/offscreen/phong.vert.spv | Bin 2180 -> 2212 bytes data/shaders/offscreen/quad.frag.spv | Bin 640 -> 568 bytes data/shaders/offscreen/quad.vert | 5 ----- data/shaders/offscreen/quad.vert.spv | Bin 1304 -> 1436 bytes examples/offscreen/offscreen.cpp | 2 ++ 10 files changed, 2 insertions(+), 16 deletions(-) diff --git a/data/shaders/offscreen/mirror.frag.spv b/data/shaders/offscreen/mirror.frag.spv index c75e397f61d00eb1becd076e3051a747d679d49d..abfc8dd81598959534d8e5b694d150a3cedaab8d 100644 GIT binary patch delta 21 ccmZ1@`b312nMs+Qfq{{MeIjS^#v?B{0W$0bZ2$lO delta 93 zcmaDNvPP7XnMs+Qfq{{MaUy52I|~CRgS$_>V~|sPacV(gQDRAId~rr%N@`Jjeo|Iy la!D}*1F{;RRAyd!d`@CsdTC;MYP^Y&K|x}2_QvX$oB)f998~}S diff --git a/data/shaders/offscreen/mirror.vert b/data/shaders/offscreen/mirror.vert index 4a29e9cf..1b56747f 100644 --- a/data/shaders/offscreen/mirror.vert +++ b/data/shaders/offscreen/mirror.vert @@ -12,11 +12,6 @@ layout (binding = 0) uniform UBO layout (location = 0) out vec2 outUV; layout (location = 1) out vec4 outPos; -out gl_PerVertex -{ - vec4 gl_Position; -}; - void main() { outUV = inUV; diff --git a/data/shaders/offscreen/mirror.vert.spv b/data/shaders/offscreen/mirror.vert.spv index 49f2eab648089e0c38a8a85c1ba78f12c090c9ff..c31c40a132a2f9ab3e20ea99b424ab83bcea836d 100644 GIT binary patch delta 418 zcmX|-!D_-l5Qb+Hn-nGWJ0V?hv#f<3kr+G7z}WFaIHQxGrGLmxmq^*KCx z^JVP8R}lLDlI<=(GxPnsGt2&#kCni6ZhR3XzFbOo9lTc~5pl5{#J!UB?q}6PI*mV` zb@rySTrW_HhfU5!FP)p*qzR~h=E`!DGrpsT$V+Zh;yQS6I|d3A^UMiDAD}-u C)-S36 delta 267 zcmaFE{ep{^nMs+Qfq@YSIT&;%@`i_NGB7YO10fTTKE%ktz{0@E;O-Oe7~~XRoLZ1r zlvt7)U!0Mcl3Em>pOlrFTvCjx1}K%8mmZ&!n3rCfn4TJMVq{Q|n4CSacqXIzWL`#b zNp+yXAdsFDACO<1S(2Hb$G{4-P;>G`#^<6iS#F3T26v#0`sR~N>5Qs!ASO_l7l;*r z?$Q9#%s>nhvxf3DH&0~IW;DV~|sPacV(gQDRAId~rr%N@`Jjeo|Iy la!D}*1F{;RRAyd!d`@CsdTC;MYP^Y&K|x}2_QrZyb^w718*~5w diff --git a/data/shaders/offscreen/phong.vert b/data/shaders/offscreen/phong.vert index 9e7c295b..27af1bd1 100644 --- a/data/shaders/offscreen/phong.vert +++ b/data/shaders/offscreen/phong.vert @@ -16,12 +16,6 @@ layout (location = 1) out vec3 outColor; layout (location = 2) out vec3 outEyePos; layout (location = 3) out vec3 outLightVec; -out gl_PerVertex -{ - vec4 gl_Position; - float gl_ClipDistance[]; -}; - void main() { outNormal = inNormal; diff --git a/data/shaders/offscreen/phong.vert.spv b/data/shaders/offscreen/phong.vert.spv index 44f4971ad23f8f3520574b4accb7f1b4b142e866..615aa777b552b4651c6e3e6a0bb44ac760d508c1 100644 GIT binary patch delta 160 zcmZn>Tq4NH%%sfDz`)4BK9RG2;)U5Z0r{DECBd0hsSH5C#=y=X0;HLMI6WucIVZEg zC9}9BF)uk4F2@X&E6vH-oX@DpsL2Qv@L*ttYvcy*g04aYMlK=n! delta 128 zcmZ1?*doZu%%sfDz`)4BIFYm7orQsu!QCg`F~}*tIJF?LD6u3pzBnT>CABC%KPf9U zxulqZ0a*=DDl;!VJ|{6Ry)-dBHQvO?pdc|hdt&<>7U!JIg3a-aij0iRn^!U&WMpSy V5Mf|o5ZGMF!q38}Fu9XM8UV*$BR>ED diff --git a/data/shaders/offscreen/quad.frag.spv b/data/shaders/offscreen/quad.frag.spv index 38044a2e5d55eb3c06d38cca6ebfbb5129257050..401a74346f9008f15c38c323804b7f38b18a3a12 100644 GIT binary patch delta 21 ccmZo*-NC}i%%sfDz`)4BK9MtfCABC%KPf9U lxulqZ0a*=DDl;!VJ|{6Ry)-dBHQvO?pdc|hdt>oYMgU#A8=(LI diff --git a/data/shaders/offscreen/quad.vert b/data/shaders/offscreen/quad.vert index 75486072..1418d5c5 100644 --- a/data/shaders/offscreen/quad.vert +++ b/data/shaders/offscreen/quad.vert @@ -11,11 +11,6 @@ layout (binding = 0) uniform UBO layout (location = 0) out vec2 outUV; -out gl_PerVertex -{ - vec4 gl_Position; -}; - void main() { outUV = inUV; diff --git a/data/shaders/offscreen/quad.vert.spv b/data/shaders/offscreen/quad.vert.spv index dbaf4b667cef2cf68c1e0119e144d7a8251fc931..0872996a8fae4889cc9212be02f9dc1f4b261bec 100644 GIT binary patch literal 1436 zcmYk4+fGwa5QY~$q9};SLB-lq&nWRijfwGWQZ7iq5V$o6J7$}*OL|C*SH6Nil27H0 ziQl)oSM6%1Gygw_H8XpaOYM3HGoc=4!=o@hi=hM)!d$53y0f#tvo#o=Y(07U*ogU1 z&I65E2^Lfmh)*g+)uwJ#zmjK;CtUq&pxDs;Zb&+OngqJ zZ`AEhd{z2)7LWES`rzFzIknuDKkN6tCdYXTu+^Nmhtu9k(nXth6+Qag!>;6eNi*7p z>l8a^V0*;wKx~a|GTebj-V-_fa?^3nC+93NPFv31cko!xxNR8c@l+AxBlg>Qra2x< zxRi6_Jnx;(6Px!2iFtA{&%3Sf-OlMwHV{w5tuf58wc=iu$TF`*4d>Bb!K$H~$SU=` zN35?2o<$og|DwRYH#z<1(KAT&i{n16cM)to_qNRcJi3W^HVeFfZH;xXyD?s_f#sfK z4SkCDUPjx4e)|&p#^k)`3c86{*L%dvh-VGFg0`-GHTZX@a*FlW(C$Fq`eJt-_j0YU zjgR$jV0)i)x6sZJ_q0*?xjKOzw!3Gj>yLt--t2J5Myp)%m1RzcrW8Td1IXA7UCQqiE)NI z1&5k&cMHzl#JGC}=UjVC;GFjn^NrW%rrC8#7kd6AIYck z#)SXdGdrofSzYV@_d4%s)VsHgsp&Ukc1?K}Ok z#Am_Wc6L+$*HN4RVCE$EB!Q%%UtRi-0-Cz*^~0kt$6;>AQ5F?8%&($>&BFBJo4qXZ z|9x~7C&O?QCBsQHwBf<4{c&{p-L#Zxx+a*q>7+P2mj=^AoH!`lR^P@9N8zc>&TUrM zAA({_9-F%~kBc}>s9@3$>xCR7fg;5MbIw?p3_r4ICgm=f8R&T;j+F=)8$Wx9NtHd?B?-t)R>L~ z6ZcW#nO4lU*9?YKL$ahDYe0(EYiehhY#4bpa2aeoezE!vt;YH~{Lavt;zAu}z zF1#d7t}=J|4sZzhSEQMPeUTr`zWi)!m5sm8zbTt~^v>Ss-Ou{Cx`QVlIH)+{@!ggf z^Ya7spUWba9^dGdsY|aM_`hO!`$MtpZ(hRg-s_efgOB7vpX(BOXMX(Yc|!v4eICfh zhZ(%jL)q}Zm4}!|65`0{;ASi$qgteQw#tA diff --git a/examples/offscreen/offscreen.cpp b/examples/offscreen/offscreen.cpp index f2cf95a2..1f6b6830 100644 --- a/examples/offscreen/offscreen.cpp +++ b/examples/offscreen/offscreen.cpp @@ -115,6 +115,8 @@ public: timerSpeed *= 0.25f; title = "Offscreen rendering"; settings.overlay = true; + // The scene shader uses a clipping plane, so this feature has to be enabled + enabledFeatures.shaderClipDistance = VK_TRUE; } ~VulkanExample()