[{"data":1,"prerenderedAt":230},["ShallowReactive",2],{"DpSEYC3JIJ":3},{"title":4,"description":5,"type":6,"xrefs":7,"body":8,"_type":229,"_id":4},"FragStencilRefEXT","Application-specified stencil reference value used in stencil tests","builtins",[],{"type":9,"children":10,"toc":225},"root",[11,24,37,78,104,118],{"type":12,"tag":13,"props":14,"children":16},"element","h6",{"id":15},"fragstencilrefext",[17],{"type":12,"tag":18,"props":19,"children":21},"code",{"className":20},[],[22],{"type":23,"value":4},"text",{"type":12,"tag":25,"props":26,"children":27},"p",{},[28,30,35],{"type":23,"value":29},"Decorating a variable with the ",{"type":12,"tag":18,"props":31,"children":33},{"className":32},[],[34],{"type":23,"value":4},{"type":23,"value":36}," built-in decoration\nwill make that variable contain the new stencil reference value for all\nsamples covered by the fragment.\nThis value will be used as the stencil reference value used in stencil\ntesting.",{"type":12,"tag":25,"props":38,"children":39},{},[40,42,47,49,54,56,62,64,69,71,76],{"type":23,"value":41},"To write to ",{"type":12,"tag":18,"props":43,"children":45},{"className":44},[],[46],{"type":23,"value":4},{"type":23,"value":48},", a shader ",{"type":12,"tag":50,"props":51,"children":53},"normative",{"type":52},"must",[],{"type":23,"value":55}," declare the\n",{"type":12,"tag":18,"props":57,"children":59},{"className":58},[],[60],{"type":23,"value":61},"StencilRefReplacingEXT",{"type":23,"value":63}," execution mode.\nIf a shader declares the ",{"type":12,"tag":18,"props":65,"children":67},{"className":66},[],[68],{"type":23,"value":61},{"type":23,"value":70}," execution mode and\nthere is an execution path through the shader that does not set\n",{"type":12,"tag":18,"props":72,"children":74},{"className":73},[],[75],{"type":23,"value":4},{"type":23,"value":77},", then the fragment’s stencil reference value is\nundefined: for executions of the shader that take that path.",{"type":12,"tag":25,"props":79,"children":80},{},[81,83,89,91,96,98,102],{"type":23,"value":82},"Only the least significant ",{"type":12,"tag":84,"props":85,"children":86},"em",{},[87],{"type":23,"value":88},"s",{"type":23,"value":90}," bits of the integer value of the variable\ndecorated with ",{"type":12,"tag":18,"props":92,"children":94},{"className":93},[],[95],{"type":23,"value":4},{"type":23,"value":97}," are considered for stencil testing,\nwhere ",{"type":12,"tag":84,"props":99,"children":100},{},[101],{"type":23,"value":88},{"type":23,"value":103}," is the number of bits in the stencil framebuffer attachment, and\nhigher order bits are discarded.",{"type":12,"tag":25,"props":105,"children":106},{},[107,109,116],{"type":23,"value":108},"See ",{"type":12,"tag":110,"props":111,"children":113},"a",{"href":112},"/chapters/fragops#fragops-shader-stencilrefreplacement",[114],{"type":23,"value":115},"fragment shader stencil\nreference replacement",{"type":23,"value":117}," for more details.",{"type":12,"tag":119,"props":120,"children":122},"validity-group",{"name":121},"Valid Usage",[123,166,206],{"type":12,"tag":124,"props":125,"children":127},"validity-field",{"name":126},"VUID-FragStencilRefEXT-FragStencilRefEXT-04223",[128],{"type":12,"tag":25,"props":129,"children":130},{},[131,133,138,140,143,145,151,153,159,160],{"type":23,"value":132},"The ",{"type":12,"tag":18,"props":134,"children":136},{"className":135},[],[137],{"type":23,"value":4},{"type":23,"value":139}," decoration ",{"type":12,"tag":50,"props":141,"children":142},{"type":52},[],{"type":23,"value":144}," be used only within the\n",{"type":12,"tag":18,"props":146,"children":148},{"className":147},[],[149],{"type":23,"value":150},"Fragment",{"type":23,"value":152}," ",{"type":12,"tag":18,"props":154,"children":156},{"className":155},[],[157],{"type":23,"value":158},"Execution",{"type":23,"value":152},{"type":12,"tag":18,"props":161,"children":163},{"className":162},[],[164],{"type":23,"value":165},"Model",{"type":12,"tag":124,"props":167,"children":169},{"name":168},"VUID-FragStencilRefEXT-FragStencilRefEXT-04224",[170],{"type":12,"tag":25,"props":171,"children":172},{},[173,175,180,181,184,186,192,193,199,200],{"type":23,"value":174},"The variable decorated with ",{"type":12,"tag":18,"props":176,"children":178},{"className":177},[],[179],{"type":23,"value":4},{"type":23,"value":152},{"type":12,"tag":50,"props":182,"children":183},{"type":52},[],{"type":23,"value":185}," be declared\nusing the ",{"type":12,"tag":18,"props":187,"children":189},{"className":188},[],[190],{"type":23,"value":191},"Output",{"type":23,"value":152},{"type":12,"tag":18,"props":194,"children":196},{"className":195},[],[197],{"type":23,"value":198},"Storage",{"type":23,"value":152},{"type":12,"tag":18,"props":201,"children":203},{"className":202},[],[204],{"type":23,"value":205},"Class",{"type":12,"tag":124,"props":207,"children":209},{"name":208},"VUID-FragStencilRefEXT-FragStencilRefEXT-04225",[210],{"type":12,"tag":25,"props":211,"children":212},{},[213,214,219,220,223],{"type":23,"value":174},{"type":12,"tag":18,"props":215,"children":217},{"className":216},[],[218],{"type":23,"value":4},{"type":23,"value":152},{"type":12,"tag":50,"props":221,"children":222},{"type":52},[],{"type":23,"value":224}," be declared as\na scalar integer value",{"title":226,"searchDepth":227,"depth":227,"links":228},"",2,[],"markdown",1729612424527]