[{"data":1,"prerenderedAt":218},["ShallowReactive",2],{"v24Glt8qll":3},{"title":4,"description":5,"type":6,"xrefs":7,"body":8,"_type":217,"_id":4},"FragDepth","Application-specified depth for depth testing","builtins",[],{"type":9,"children":10,"toc":213},"root",[11,24,52,66],{"type":12,"tag":13,"props":14,"children":16},"element","h6",{"id":15},"fragdepth",[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,37,43,45,50],{"type":23,"value":29},"To have a shader supply a fragment-depth value, the shader ",{"type":12,"tag":31,"props":32,"children":34},"normative",{"type":33},"must",[],{"type":23,"value":36}," declare the\n",{"type":12,"tag":18,"props":38,"children":40},{"className":39},[],[41],{"type":23,"value":42},"DepthReplacing",{"type":23,"value":44}," execution mode.\nSuch a shader’s fragment-depth value will come from the variable decorated\nwith the ",{"type":12,"tag":18,"props":46,"children":48},{"className":47},[],[49],{"type":23,"value":4},{"type":23,"value":51}," built-in decoration.",{"type":12,"tag":25,"props":53,"children":54},{},[55,57,64],{"type":23,"value":56},"This value will be used for any subsequent depth testing performed by the\nimplementation or writes to the depth attachment.\nSee ",{"type":12,"tag":58,"props":59,"children":61},"a",{"href":60},"/chapters/fragops#fragops-shader-depthreplacement",[62],{"type":23,"value":63},"fragment shader depth replacement",{"type":23,"value":65},"\nfor details.",{"type":12,"tag":67,"props":68,"children":70},"validity-group",{"name":69},"Valid Usage",[71,114,154,173],{"type":12,"tag":72,"props":73,"children":75},"validity-field",{"name":74},"VUID-FragDepth-FragDepth-04213",[76],{"type":12,"tag":25,"props":77,"children":78},{},[79,81,86,88,91,93,99,101,107,108],{"type":23,"value":80},"The ",{"type":12,"tag":18,"props":82,"children":84},{"className":83},[],[85],{"type":23,"value":4},{"type":23,"value":87}," decoration ",{"type":12,"tag":31,"props":89,"children":90},{"type":33},[],{"type":23,"value":92}," be used only within the\n",{"type":12,"tag":18,"props":94,"children":96},{"className":95},[],[97],{"type":23,"value":98},"Fragment",{"type":23,"value":100}," ",{"type":12,"tag":18,"props":102,"children":104},{"className":103},[],[105],{"type":23,"value":106},"Execution",{"type":23,"value":100},{"type":12,"tag":18,"props":109,"children":111},{"className":110},[],[112],{"type":23,"value":113},"Model",{"type":12,"tag":72,"props":115,"children":117},{"name":116},"VUID-FragDepth-FragDepth-04214",[118],{"type":12,"tag":25,"props":119,"children":120},{},[121,123,128,129,132,134,140,141,147,148],{"type":23,"value":122},"The variable decorated with ",{"type":12,"tag":18,"props":124,"children":126},{"className":125},[],[127],{"type":23,"value":4},{"type":23,"value":100},{"type":12,"tag":31,"props":130,"children":131},{"type":33},[],{"type":23,"value":133}," be declared using the\n",{"type":12,"tag":18,"props":135,"children":137},{"className":136},[],[138],{"type":23,"value":139},"Output",{"type":23,"value":100},{"type":12,"tag":18,"props":142,"children":144},{"className":143},[],[145],{"type":23,"value":146},"Storage",{"type":23,"value":100},{"type":12,"tag":18,"props":149,"children":151},{"className":150},[],[152],{"type":23,"value":153},"Class",{"type":12,"tag":72,"props":155,"children":157},{"name":156},"VUID-FragDepth-FragDepth-04215",[158],{"type":12,"tag":25,"props":159,"children":160},{},[161,162,167,168,171],{"type":23,"value":122},{"type":12,"tag":18,"props":163,"children":165},{"className":164},[],[166],{"type":23,"value":4},{"type":23,"value":100},{"type":12,"tag":31,"props":169,"children":170},{"type":33},[],{"type":23,"value":172}," be declared as a scalar\n32-bit floating-point value",{"type":12,"tag":72,"props":174,"children":176},{"name":175},"VUID-FragDepth-FragDepth-04216",[177],{"type":12,"tag":25,"props":178,"children":179},{},[180,182,187,189,194,195,200,201,207,208,211],{"type":23,"value":181},"If the shader dynamically writes to the variable decorated with\n",{"type":12,"tag":18,"props":183,"children":185},{"className":184},[],[186],{"type":23,"value":4},{"type":23,"value":188},", the ",{"type":12,"tag":18,"props":190,"children":192},{"className":191},[],[193],{"type":23,"value":42},{"type":23,"value":100},{"type":12,"tag":18,"props":196,"children":198},{"className":197},[],[199],{"type":23,"value":106},{"type":23,"value":100},{"type":12,"tag":18,"props":202,"children":204},{"className":203},[],[205],{"type":23,"value":206},"Mode",{"type":23,"value":100},{"type":12,"tag":31,"props":209,"children":210},{"type":33},[],{"type":23,"value":212}," be\ndeclared",{"title":214,"searchDepth":215,"depth":215,"links":216},"",2,[],"markdown",1729612424411]