[{"data":1,"prerenderedAt":622},["ShallowReactive",2],{"ZSwbEgfYNF":3},{"title":4,"description":5,"parent":6,"cmd_buf_level":7,"render_pass_scope":10,"supported_queue_types":11,"tasks":13,"type":15,"xrefs":16,"body":17,"_type":621,"_id":4},"vkCmdSetDepthBias","Set depth bias factors and clamp dynamically for a command buffer","VK_VERSION_1_0",[8,9],"primary","secondary","both",[12],"graphics",[14],"state","protos",[],{"type":18,"children":19,"toc":619},"root",[20,37,284,332,395,424,470,567,613],{"type":21,"tag":22,"props":23,"children":24},"element","p",{},[25,28,35],{"type":26,"value":27},"text","To ",{"type":21,"tag":29,"props":30,"children":32},"a",{"href":31},"/chapters/pipelines#pipelines-dynamic-state",[33],{"type":26,"value":34},"dynamically set",{"type":26,"value":36}," the depth bias parameters,\ncall:",{"type":21,"tag":38,"props":39,"children":40},"code-group",{},[41,151],{"type":21,"tag":42,"props":43,"children":49},"pre",{"className":44,"code":45,"filename":46,"language":47,"meta":48,"style":48},"language-c shiki shiki-themes github-light-default github-dark-default","void vkCmdSetDepthBias(\n VkCommandBuffer commandBuffer,\n float depthBiasConstantFactor,\n float depthBiasClamp,\n float depthBiasSlopeFactor);\n","C","c","",[50],{"type":21,"tag":51,"props":52,"children":53},"code",{"__ignoreMap":48},[54,78,98,116,133],{"type":21,"tag":55,"props":56,"children":59},"span",{"class":57,"line":58},"line",1,[60,66,72],{"type":21,"tag":55,"props":61,"children":63},{"style":62},"--shiki-default:#CF222E;--shiki-dark:#FF7B72",[64],{"type":26,"value":65},"void",{"type":21,"tag":55,"props":67,"children":69},{"style":68},"--shiki-default:#8250DF;--shiki-dark:#D2A8FF",[70],{"type":26,"value":71}," vkCmdSetDepthBias",{"type":21,"tag":55,"props":73,"children":75},{"style":74},"--shiki-default:#1F2328;--shiki-dark:#E6EDF3",[76],{"type":26,"value":77},"(\n",{"type":21,"tag":55,"props":79,"children":81},{"class":57,"line":80},2,[82,87,93],{"type":21,"tag":55,"props":83,"children":84},{"style":74},[85],{"type":26,"value":86}," VkCommandBuffer ",{"type":21,"tag":55,"props":88,"children":90},{"style":89},"--shiki-default:#953800;--shiki-dark:#FFA657",[91],{"type":26,"value":92},"commandBuffer",{"type":21,"tag":55,"props":94,"children":95},{"style":74},[96],{"type":26,"value":97},",\n",{"type":21,"tag":55,"props":99,"children":101},{"class":57,"line":100},3,[102,107,112],{"type":21,"tag":55,"props":103,"children":104},{"style":62},[105],{"type":26,"value":106}," float",{"type":21,"tag":55,"props":108,"children":109},{"style":89},[110],{"type":26,"value":111}," depthBiasConstantFactor",{"type":21,"tag":55,"props":113,"children":114},{"style":74},[115],{"type":26,"value":97},{"type":21,"tag":55,"props":117,"children":119},{"class":57,"line":118},4,[120,124,129],{"type":21,"tag":55,"props":121,"children":122},{"style":62},[123],{"type":26,"value":106},{"type":21,"tag":55,"props":125,"children":126},{"style":89},[127],{"type":26,"value":128}," depthBiasClamp",{"type":21,"tag":55,"props":130,"children":131},{"style":74},[132],{"type":26,"value":97},{"type":21,"tag":55,"props":134,"children":136},{"class":57,"line":135},5,[137,141,146],{"type":21,"tag":55,"props":138,"children":139},{"style":62},[140],{"type":26,"value":106},{"type":21,"tag":55,"props":142,"children":143},{"style":89},[144],{"type":26,"value":145}," depthBiasSlopeFactor",{"type":21,"tag":55,"props":147,"children":148},{"style":74},[149],{"type":26,"value":150},");\n",{"type":21,"tag":42,"props":152,"children":157},{"className":153,"code":154,"filename":155,"language":156,"meta":48,"style":48},"language-rs shiki shiki-themes github-light-default github-dark-default","pub fn cmd_set_depth_bias(\n command_buffer: vk::CommandBuffer,\n depth_bias_constant_factor: f32,\n depth_bias_clamp: f32,\n depth_bias_slope_factor: f32,\n);\n","Rust","rs",[158],{"type":21,"tag":51,"props":159,"children":160},{"__ignoreMap":48},[161,183,215,236,256,276],{"type":21,"tag":55,"props":162,"children":163},{"class":57,"line":58},[164,169,174,179],{"type":21,"tag":55,"props":165,"children":166},{"style":62},[167],{"type":26,"value":168},"pub",{"type":21,"tag":55,"props":170,"children":171},{"style":62},[172],{"type":26,"value":173}," fn",{"type":21,"tag":55,"props":175,"children":176},{"style":68},[177],{"type":26,"value":178}," cmd_set_depth_bias",{"type":21,"tag":55,"props":180,"children":181},{"style":74},[182],{"type":26,"value":77},{"type":21,"tag":55,"props":184,"children":185},{"class":57,"line":80},[186,191,196,201,206,211],{"type":21,"tag":55,"props":187,"children":188},{"style":74},[189],{"type":26,"value":190}," command_buffer",{"type":21,"tag":55,"props":192,"children":193},{"style":62},[194],{"type":26,"value":195},":",{"type":21,"tag":55,"props":197,"children":198},{"style":89},[199],{"type":26,"value":200}," vk",{"type":21,"tag":55,"props":202,"children":203},{"style":62},[204],{"type":26,"value":205},"::",{"type":21,"tag":55,"props":207,"children":208},{"style":89},[209],{"type":26,"value":210},"CommandBuffer",{"type":21,"tag":55,"props":212,"children":213},{"style":74},[214],{"type":26,"value":97},{"type":21,"tag":55,"props":216,"children":217},{"class":57,"line":100},[218,223,227,232],{"type":21,"tag":55,"props":219,"children":220},{"style":74},[221],{"type":26,"value":222}," depth_bias_constant_factor",{"type":21,"tag":55,"props":224,"children":225},{"style":62},[226],{"type":26,"value":195},{"type":21,"tag":55,"props":228,"children":229},{"style":89},[230],{"type":26,"value":231}," f32",{"type":21,"tag":55,"props":233,"children":234},{"style":74},[235],{"type":26,"value":97},{"type":21,"tag":55,"props":237,"children":238},{"class":57,"line":118},[239,244,248,252],{"type":21,"tag":55,"props":240,"children":241},{"style":74},[242],{"type":26,"value":243}," depth_bias_clamp",{"type":21,"tag":55,"props":245,"children":246},{"style":62},[247],{"type":26,"value":195},{"type":21,"tag":55,"props":249,"children":250},{"style":89},[251],{"type":26,"value":231},{"type":21,"tag":55,"props":253,"children":254},{"style":74},[255],{"type":26,"value":97},{"type":21,"tag":55,"props":257,"children":258},{"class":57,"line":135},[259,264,268,272],{"type":21,"tag":55,"props":260,"children":261},{"style":74},[262],{"type":26,"value":263}," depth_bias_slope_factor",{"type":21,"tag":55,"props":265,"children":266},{"style":62},[267],{"type":26,"value":195},{"type":21,"tag":55,"props":269,"children":270},{"style":89},[271],{"type":26,"value":231},{"type":21,"tag":55,"props":273,"children":274},{"style":74},[275],{"type":26,"value":97},{"type":21,"tag":55,"props":277,"children":279},{"class":57,"line":278},6,[280],{"type":21,"tag":55,"props":281,"children":282},{"style":74},[283],{"type":26,"value":150},{"type":21,"tag":285,"props":286,"children":287},"ul",{},[288,299,310,321],{"type":21,"tag":289,"props":290,"children":291},"li",{},[292,297],{"type":21,"tag":51,"props":293,"children":295},{"className":294},[],[296],{"type":26,"value":92},{"type":26,"value":298}," is the command buffer into which the command will be\nrecorded.",{"type":21,"tag":289,"props":300,"children":301},{},[302,308],{"type":21,"tag":51,"props":303,"children":305},{"className":304},[],[306],{"type":26,"value":307},"depthBiasConstantFactor",{"type":26,"value":309}," is a scalar factor controlling the\nconstant depth value added to each fragment.",{"type":21,"tag":289,"props":311,"children":312},{},[313,319],{"type":21,"tag":51,"props":314,"children":316},{"className":315},[],[317],{"type":26,"value":318},"depthBiasClamp",{"type":26,"value":320}," is the maximum (or minimum) depth bias of a\nfragment.",{"type":21,"tag":289,"props":322,"children":323},{},[324,330],{"type":21,"tag":51,"props":325,"children":327},{"className":326},[],[328],{"type":26,"value":329},"depthBiasSlopeFactor",{"type":26,"value":331}," is a scalar factor applied to a fragment’s\nslope in depth bias calculations.",{"type":21,"tag":22,"props":333,"children":334},{},[335,337,343,345,351,353,359,360,366,368,374,375,380,381,386,388,393],{"type":26,"value":336},"This command sets the depth bias parameters for subsequent drawing commands\nwhen drawing using ",{"type":21,"tag":29,"props":338,"children":340},{"href":339},"/chapters/shaders#shaders-objects",[341],{"type":26,"value":342},"shader objects",{"type":26,"value":344},", or\nwhen the graphics pipeline is created with ",{"type":21,"tag":51,"props":346,"children":348},{"className":347},[],[349],{"type":26,"value":350},"VK_DYNAMIC_STATE_DEPTH_BIAS",{"type":26,"value":352},"\nset in ",{"type":21,"tag":29,"props":354,"children":356},{"href":355},"/man/VkPipelineDynamicStateCreateInfo",[357],{"type":26,"value":358},"VkPipelineDynamicStateCreateInfo",{"type":26,"value":205},{"type":21,"tag":51,"props":361,"children":363},{"className":362},[],[364],{"type":26,"value":365},"pDynamicStates",{"type":26,"value":367},".\nOtherwise, this state is specified by the corresponding\n",{"type":21,"tag":29,"props":369,"children":371},{"href":370},"/man/VkPipelineRasterizationStateCreateInfo",[372],{"type":26,"value":373},"VkPipelineRasterizationStateCreateInfo",{"type":26,"value":205},{"type":21,"tag":51,"props":376,"children":378},{"className":377},[],[379],{"type":26,"value":307},{"type":26,"value":97},{"type":21,"tag":51,"props":382,"children":384},{"className":383},[],[385],{"type":26,"value":318},{"type":26,"value":387},", and ",{"type":21,"tag":51,"props":389,"children":391},{"className":390},[],[392],{"type":26,"value":329},{"type":26,"value":394}," values used to create\nthe currently active pipeline.",{"type":21,"tag":22,"props":396,"children":397},{},[398,400,406,408,414,416,422],{"type":26,"value":399},"Calling this function is equivalent to calling ",{"type":21,"tag":51,"props":401,"children":403},{"className":402},[],[404],{"type":26,"value":405},"vkCmdSetDepthBias2EXT",{"type":26,"value":407},"\nwithout a ",{"type":21,"tag":51,"props":409,"children":411},{"className":410},[],[412],{"type":26,"value":413},"VkDepthBiasRepresentationInfoEXT",{"type":26,"value":415}," in the pNext chain of\n",{"type":21,"tag":51,"props":417,"children":419},{"className":418},[],[420],{"type":26,"value":421},"VkDepthBiasInfoEXT",{"type":26,"value":423},".",{"type":21,"tag":425,"props":426,"children":428},"validity-group",{"name":427},"Valid Usage",[429],{"type":21,"tag":430,"props":431,"children":433},"validity-field",{"name":432},"VUID-vkCmdSetDepthBias-depthBiasClamp-00790",[434],{"type":21,"tag":22,"props":435,"children":436},{},[437,439,448,450,455,457,462,464],{"type":26,"value":438},"If the ",{"type":21,"tag":29,"props":440,"children":442},{"href":441},"/man/VkPhysicalDeviceFeatures#features-depthBiasClamp",[443],{"type":21,"tag":51,"props":444,"children":446},{"className":445},[],[447],{"type":26,"value":318},{"type":26,"value":449}," feature is not\nenabled, ",{"type":21,"tag":51,"props":451,"children":453},{"className":452},[],[454],{"type":26,"value":318},{"type":26,"value":456}," ",{"type":21,"tag":458,"props":459,"children":461},"normative",{"type":460},"must",[],{"type":26,"value":463}," be ",{"type":21,"tag":51,"props":465,"children":467},{"className":466},[],[468],{"type":26,"value":469},"0.0",{"type":21,"tag":425,"props":471,"children":473},{"name":472},"Valid Usage (Implicit)",[474,500,524,553],{"type":21,"tag":430,"props":475,"children":477},{"name":476},"VUID-vkCmdSetDepthBias-commandBuffer-parameter",[478],{"type":21,"tag":22,"props":479,"children":480},{},[481,486,487,490,492,498],{"type":21,"tag":51,"props":482,"children":484},{"className":483},[],[485],{"type":26,"value":92},{"type":26,"value":456},{"type":21,"tag":458,"props":488,"children":489},{"type":460},[],{"type":26,"value":491}," be a valid ",{"type":21,"tag":29,"props":493,"children":495},{"href":494},"/man/VkCommandBuffer",[496],{"type":26,"value":497},"VkCommandBuffer",{"type":26,"value":499}," handle",{"type":21,"tag":430,"props":501,"children":503},{"name":502},"VUID-vkCmdSetDepthBias-commandBuffer-recording",[504],{"type":21,"tag":22,"props":505,"children":506},{},[507,512,513,516,518],{"type":21,"tag":51,"props":508,"children":510},{"className":509},[],[511],{"type":26,"value":92},{"type":26,"value":456},{"type":21,"tag":458,"props":514,"children":515},{"type":460},[],{"type":26,"value":517}," be in the ",{"type":21,"tag":29,"props":519,"children":521},{"href":520},"/chapters/commandbuffers#commandbuffers-lifecycle",[522],{"type":26,"value":523},"recording state",{"type":21,"tag":430,"props":525,"children":527},{"name":526},"VUID-vkCmdSetDepthBias-commandBuffer-cmdpool",[528],{"type":21,"tag":22,"props":529,"children":530},{},[531,533,539,541,546,548,551],{"type":26,"value":532},"The ",{"type":21,"tag":51,"props":534,"children":536},{"className":535},[],[537],{"type":26,"value":538},"VkCommandPool",{"type":26,"value":540}," that ",{"type":21,"tag":51,"props":542,"children":544},{"className":543},[],[545],{"type":26,"value":92},{"type":26,"value":547}," was allocated from ",{"type":21,"tag":458,"props":549,"children":550},{"type":460},[],{"type":26,"value":552}," support graphics operations",{"type":21,"tag":430,"props":554,"children":556},{"name":555},"VUID-vkCmdSetDepthBias-videocoding",[557],{"type":21,"tag":22,"props":558,"children":559},{},[560,562,565],{"type":26,"value":561},"This command ",{"type":21,"tag":458,"props":563,"children":564},{"type":460},[],{"type":26,"value":566}," only be called outside of a video coding scope",{"type":21,"tag":568,"props":569,"children":571},"validity-box",{"name":570},"Host Synchronization",[572],{"type":21,"tag":285,"props":573,"children":574},{},[575,591],{"type":21,"tag":289,"props":576,"children":577},{},[578,580,585,586,589],{"type":26,"value":579},"Host access to ",{"type":21,"tag":51,"props":581,"children":583},{"className":582},[],[584],{"type":26,"value":92},{"type":26,"value":456},{"type":21,"tag":458,"props":587,"children":588},{"type":460},[],{"type":26,"value":590}," be externally synchronized",{"type":21,"tag":289,"props":592,"children":593},{},[594,596,601,602,607,608,611],{"type":26,"value":595},"Host access to the ",{"type":21,"tag":51,"props":597,"children":599},{"className":598},[],[600],{"type":26,"value":538},{"type":26,"value":540},{"type":21,"tag":51,"props":603,"children":605},{"className":604},[],[606],{"type":26,"value":92},{"type":26,"value":547},{"type":21,"tag":458,"props":609,"children":610},{"type":460},[],{"type":26,"value":612}," be externally synchronized\n::",{"type":21,"tag":614,"props":615,"children":616},"style",{},[617],{"type":26,"value":618},"html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":48,"searchDepth":80,"depth":80,"links":620},[],"markdown",1725732608267]