1"use strict";(self.webpackChunkproject_website=self.webpackChunkproject_website||[]).push([["4344"],{34766(e,o,t){t.r(o),t.d(o,{metadata:()=>r,default:()=>a,frontMatter:()=>i,contentTitle:()=>s,toc:()=>l,assets:()=>p});var r=JSON.parse('{"id":"api-reference/core/project32","title":"project32 (Shader Module)","description":"The project32 shader module is an extension of the project shader module that adds some projection utilities.","source":"@site/../docs/api-reference/core/project32.md","sourceDirName":"api-reference/core","slug":"/api-reference/core/project32","permalink":"/docs/api-reference/core/project32","draft":false,"unlisted":false,"editUrl":"https://github.com/visgl/deck.gl/tree/master/website/../docs/api-reference/core/project32.md","tags":[],"version":"current","frontMatter":{},"sidebar":"tutorialSidebar","previous":{"title":"project (Shader Module)","permalink":"/docs/api-reference/core/project"},"next":{"title":"project64 (Shader Module)","permalink":"/docs/api-reference/core/project64"}}'),c=t(74848),n=t(28453);let i={},s="project32 (Shader Module)",p={},l=[{value:"GLSL Functions",id:"glsl-functions",level:2},{value:"project_position_to_clipspace",id:"project_position_to_clipspace",level:3}];function d(e){let o={a:"a",code:"code",h1:"h1",h2:"h2",h3:"h3",header:"header",li:"li",p:"p",pre:"pre",ul:"ul",...(0,n.R)(),...e.components};return(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(o.header,{children:(0,c.jsx)(o.h1,{id:"project32-shader-module",children:"project32 (Shader Module)"})}),"\n",(0,c.jsxs)(o.p,{children:["The ",(0,c.jsx)(o.code,{children:"project32"})," shader module is an extension of the ",(0,c.jsx)(o.a,{href:"/docs/api-reference/core/project",children:"project"})," shader module that adds some projection utilities."]}),"\n",(0,c.jsx)(o.h2,{id:"glsl-functions",children:"GLSL Functions"}),"\n",(0,c.jsx)(o.h3,{id:"project_position_to_clipspace",children:"project_position_to_clipspace"}),"\n",(0,c.jsxs)(o.p,{children:["32 bit implementation of the ",(0,c.jsx)(o.code,{children:"project_position_to_clipspace"})," interface."]}),"\n",(0,c.jsx)(o.pre,{children:(0,c.jsx)(o.code,{className:"language-glsl",children:"vec4 project_position_to_clipspace(vec3 position, vec3 position64Low, vec3 offset)\nvec4 project_position_to_clipspace(vec3 position, vec3 position64Low, vec3 offset, out vec4 commonPosition)\n"})}),"\n",(0,c.jsx)(o.p,{children:"Parameters:"}),"\n",(0,c.jsxs)(o.ul,{children:["\n",(0,c.jsxs)(o.li,{children:[(0,c.jsx)(o.code,{children:"position"})," - vertex position in the layer's coordinate system."]}),"\n",(0,c.jsxs)(o.li,{children:[(0,c.jsx)(o.code,{children:"position64Low"})," - lower part of the vertex position, calculated as ",(0,c.jsx)(o.code,{children:"aLow = a - Math.fround(a)"}),"."]}),"\n",(0,c.jsxs)(o.li,{children:[(0,c.jsx)(o.code,{children:"offset"})," - offset from the coordinate, in common space"]}),"\n",(0,c.jsxs)(o.li,{children:[(0,c.jsx)(o.code,{children:"commonPosition"})," - projected position in the common space"]}),"\n"]}),"\n",(0,c.jsx)(o.p,{children:"Returns:\nProjected position in the clipspace."})]})}function a(e={}){let{wrapper:o}={...(0,n.R)(),...e.components};return o?(0,c.jsx)(o,{...e,children:(0,c.jsx)(d,{...e})}):d(e)}},28453(e,o,t){t.d(o,{R:()=>i,x:()=>s});var r=t(96540);let c={},n=r.createContext(c);function i(e){let o=r.useContext(n);return r.useMemo(function(){return"function"==typeof e?e(o):{...o,...e}},[o,e])}function s(e){let o;return o=e.disableParentContext?"function"==typeof e.components?e.components(c):e.components||c:i(e.components),r.createElement(n.Provider,{value:o},e.children)}}}]); 2//# sourceMappingURL=8c143e71.8015eb9b.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.