[{"data":1,"prerenderedAt":512},["Reactive",2],{"content-query-f8hpzeCprL":3},{"_path":4,"_dir":5,"_draft":6,"_partial":6,"_locale":7,"title":8,"description":9,"body":10,"_type":507,"_id":508,"_source":509,"_file":510,"_extension":511},"/docs/dev/shader-sdk-win","dev",false,"","Shader SDK (WIN)","This tutorial demonstrates How-to set up Beam Shader SDK on the Windows operating system.",{"type":11,"children":12,"toc":500},"root",[13,21,26,43,50,66,89,95,134,139,152,158,174,184,205,214,223,240,260,269,279,284,299,305,324,334,375,390,403,413,426,435,440,485,495],{"type":14,"tag":15,"props":16,"children":18},"element","h1",{"id":17},"shader-sdk-win",[19],{"type":20,"value":8},"text",{"type":14,"tag":22,"props":23,"children":24},"p",{},[25],{"type":20,"value":9},{"type":14,"tag":22,"props":27,"children":28},{},[29,31,41],{"type":20,"value":30},"The Shader SDK's current version can be characterized as an ",{"type":14,"tag":32,"props":33,"children":34},"em",{},[35],{"type":14,"tag":36,"props":37,"children":38},"strong",{},[39],{"type":20,"value":40},"early developer preview",{"type":20,"value":42},", with a high possibility of encountering unusual issues and bugs.",{"type":14,"tag":44,"props":45,"children":47},"h3",{"id":46},"prerequisites",[48],{"type":20,"value":49},"Prerequisites",{"type":14,"tag":22,"props":51,"children":52},{},[53,55,64],{"type":20,"value":54},"To follow along, make sure you have ",{"type":14,"tag":56,"props":57,"children":61},"a",{"href":58,"rel":59},"https://visualstudio.microsoft.com/",[60],"nofollow",[62],{"type":20,"value":63},"Microsoft Visual Studio",{"type":20,"value":65}," installed. For this tutorial, I am using 2022 edition, but the community edition will work.",{"type":14,"tag":22,"props":67,"children":68},{},[69,71,78,80,87],{"type":20,"value":70},"Additionally, ",{"type":14,"tag":56,"props":72,"children":75},{"href":73,"rel":74},"https://www.python.org/downloads/",[60],[76],{"type":20,"value":77},"Python 3.x",{"type":20,"value":79}," must be installed and available in the systems path. Verify Python is installed by entering  ",{"type":14,"tag":81,"props":82,"children":84},"code",{"className":83},[],[85],{"type":20,"value":86},"python",{"type":20,"value":88}," in the command line.",{"type":14,"tag":44,"props":90,"children":92},{"id":91},"building-shader-sdk",[93],{"type":20,"value":94},"Building Shader SDK",{"type":14,"tag":96,"props":97,"children":98},"ol",{},[99,118,123],{"type":14,"tag":100,"props":101,"children":102},"li",{},[103,113],{"type":14,"tag":56,"props":104,"children":107},{"href":105,"rel":106},"https://github.com/BeamMW/shader-sdk",[60],[108],{"type":14,"tag":36,"props":109,"children":110},{},[111],{"type":20,"value":112},"Clone Shader SDK repository",{"type":14,"tag":36,"props":114,"children":115},{},[116],{"type":20,"value":117},".",{"type":14,"tag":100,"props":119,"children":120},{},[121],{"type":20,"value":122},"Open Developer Command Prompt for VS. This can be done from either Tools Menu within the VS IDE or by finding an entry in the Start menu items",{"type":14,"tag":100,"props":124,"children":125},{},[126,128],{"type":20,"value":127},"Change directory to the location of the shader-sdk and run: ",{"type":14,"tag":81,"props":129,"children":131},{"className":130},[],[132],{"type":20,"value":133},"shade init",{"type":14,"tag":22,"props":135,"children":136},{},[137],{"type":20,"value":138},"This will operation will install and build all the necessary components.",{"type":14,"tag":140,"props":141,"children":142},"figure",{},[143,148],{"type":14,"tag":144,"props":145,"children":147},"img",{"src":146,"alt":7},".gitbook/assets/image (8).png",[],{"type":14,"tag":149,"props":150,"children":151},"figcaption",{},[],{"type":14,"tag":44,"props":153,"children":155},{"id":154},"creating-a-new-shader-project",[156],{"type":20,"value":157},"Creating a new Shader Project",{"type":14,"tag":96,"props":159,"children":160},{},[161],{"type":14,"tag":100,"props":162,"children":163},{},[164,166,172],{"type":20,"value":165},"Launch the Command Prompt, creating a new folder for your Shader project. We will use the ",{"type":14,"tag":81,"props":167,"children":169},{"className":168},[],[170],{"type":20,"value":171},"vault",{"type":20,"value":173}," folder for this tutorial:",{"type":14,"tag":140,"props":175,"children":176},{},[177,181],{"type":14,"tag":144,"props":178,"children":180},{"src":179,"alt":7},".gitbook/assets/image (19).png",[],{"type":14,"tag":149,"props":182,"children":183},{},[],{"type":14,"tag":22,"props":185,"children":186},{},[187,189,195,197,203],{"type":20,"value":188},"2. Locate ",{"type":14,"tag":81,"props":190,"children":192},{"className":191},[],[193],{"type":20,"value":194},"shader-sdk",{"type":20,"value":196}," and ",{"type":14,"tag":81,"props":198,"children":200},{"className":199},[],[201],{"type":20,"value":202},"wasi-sdk",{"type":20,"value":204},"folders, and enter the following:",{"type":14,"tag":22,"props":206,"children":207},{},[208],{"type":14,"tag":81,"props":209,"children":211},{"className":210},[],[212],{"type":20,"value":213},"set BEAM_SHADER_SDK=c:\\Code\\shader-sdk",{"type":14,"tag":22,"props":215,"children":216},{},[217],{"type":14,"tag":81,"props":218,"children":220},{"className":219},[],[221],{"type":20,"value":222},"set WASI_SDK_PREFIX=C:\\Code\\shader-sdk\\wasi-sdk-14.0",{"type":14,"tag":96,"props":224,"children":226},{"start":225},3,[227],{"type":14,"tag":100,"props":228,"children":229},{},[230,232,238],{"type":20,"value":231},"To initialize the structure of your Shader, enter  ",{"type":14,"tag":81,"props":233,"children":235},{"className":234},[],[236],{"type":20,"value":237},"shade create_project \u003Cproject name>",{"type":20,"value":239},":",{"type":14,"tag":22,"props":241,"children":242},{},[243,245,251,253,258],{"type":20,"value":244},"For our ",{"type":14,"tag":81,"props":246,"children":248},{"className":247},[],[249],{"type":20,"value":250},"\u003Cproject name>",{"type":20,"value":252},", use ",{"type":14,"tag":81,"props":254,"children":256},{"className":255},[],[257],{"type":20,"value":171},{"type":20,"value":259},", i.e.,:",{"type":14,"tag":22,"props":261,"children":262},{},[263],{"type":14,"tag":81,"props":264,"children":266},{"className":265},[],[267],{"type":20,"value":268},"c:\\Code\\shader-sdk\\shade create_project vault",{"type":14,"tag":140,"props":270,"children":271},{},[272,276],{"type":14,"tag":144,"props":273,"children":275},{"src":274,"alt":7},".gitbook/assets/image (4).png",[],{"type":14,"tag":149,"props":277,"children":278},{},[],{"type":14,"tag":22,"props":280,"children":281},{},[282],{"type":20,"value":283},"If initialized correctly, your Shader project structure should resemble the following:",{"type":14,"tag":140,"props":285,"children":286},{},[287,291],{"type":14,"tag":144,"props":288,"children":290},{"src":289,"alt":7},".gitbook/assets/image (1).png",[],{"type":14,"tag":149,"props":292,"children":293},{},[294],{"type":14,"tag":22,"props":295,"children":296},{},[297],{"type":20,"value":298},"Vault project structure",{"type":14,"tag":44,"props":300,"children":302},{"id":301},"building-the-shader-project",[303],{"type":20,"value":304},"Building the Shader Project",{"type":14,"tag":22,"props":306,"children":307},{},[308,310,315,317,322],{"type":20,"value":309},"In Visual Studio, locate ",{"type":14,"tag":36,"props":311,"children":312},{},[313],{"type":20,"value":314},"Open A Local Folder",{"type":20,"value":316}," from the ",{"type":14,"tag":36,"props":318,"children":319},{},[320],{"type":20,"value":321},"Start",{"type":20,"value":323}," menu:",{"type":14,"tag":140,"props":325,"children":326},{},[327,331],{"type":14,"tag":144,"props":328,"children":330},{"src":329,"alt":7},".gitbook/assets/image (23).png",[],{"type":14,"tag":149,"props":332,"children":333},{},[],{"type":14,"tag":22,"props":335,"children":336},{},[337,339,344,346,351,353,359,360,366,368,373],{"type":20,"value":338},"Navigate to your Shader project folder, click ",{"type":14,"tag":36,"props":340,"children":341},{},[342],{"type":20,"value":343},"Select Folder",{"type":20,"value":345}," to initialize a ",{"type":14,"tag":36,"props":347,"children":348},{},[349],{"type":20,"value":350},"CMake project",{"type":20,"value":352},", creating ",{"type":14,"tag":81,"props":354,"children":356},{"className":355},[],[357],{"type":20,"value":358},"CMakeLists.txt",{"type":20,"value":196},{"type":14,"tag":81,"props":361,"children":363},{"className":362},[],[364],{"type":20,"value":365},"CMakeLists.json",{"type":20,"value":367}," files will be seen in the ",{"type":14,"tag":36,"props":369,"children":370},{},[371],{"type":20,"value":372},"Solution Explorer",{"type":20,"value":374}," for your Shader project:",{"type":14,"tag":140,"props":376,"children":377},{},[378,382],{"type":14,"tag":144,"props":379,"children":381},{"src":380,"alt":7},".gitbook/assets/image (10).png",[],{"type":14,"tag":149,"props":383,"children":384},{},[385],{"type":14,"tag":22,"props":386,"children":387},{},[388],{"type":20,"value":389},"Vault Solution Explorer",{"type":14,"tag":22,"props":391,"children":392},{},[393,395,401],{"type":20,"value":394},"Select ",{"type":14,"tag":81,"props":396,"children":398},{"className":397},[],[399],{"type":20,"value":400},"wasm32-Release",{"type":20,"value":402}," build configuration:",{"type":14,"tag":140,"props":404,"children":405},{},[406,410],{"type":14,"tag":144,"props":407,"children":409},{"src":408,"alt":7},".gitbook/assets/image (13).png",[],{"type":14,"tag":149,"props":411,"children":412},{},[],{"type":14,"tag":22,"props":414,"children":415},{},[416,418,424],{"type":20,"value":417},"This will build ",{"type":14,"tag":81,"props":419,"children":421},{"className":420},[],[422],{"type":20,"value":423},".wasm",{"type":20,"value":425}," files following this folder structure:",{"type":14,"tag":22,"props":427,"children":428},{},[429],{"type":14,"tag":81,"props":430,"children":432},{"className":431},[],[433],{"type":20,"value":434},"C:\\Code\\vault\\build\\wasi\\shaders",{"type":14,"tag":22,"props":436,"children":437},{},[438],{"type":20,"value":439},"If you are encountering errors, try the following before reaching out to support:",{"type":14,"tag":96,"props":441,"children":442},{},[443,456,473],{"type":14,"tag":100,"props":444,"children":445},{},[446,448,454],{"type":20,"value":447},"Open Windows Explorer and delete the ",{"type":14,"tag":81,"props":449,"children":451},{"className":450},[],[452],{"type":20,"value":453},"out",{"type":20,"value":455}," folder.",{"type":14,"tag":100,"props":457,"children":458},{},[459,461,466,468],{"type":20,"value":460},"In the  ",{"type":14,"tag":36,"props":462,"children":463},{},[464],{"type":20,"value":465},"Project",{"type":20,"value":467}," menu, select ",{"type":14,"tag":36,"props":469,"children":470},{},[471],{"type":20,"value":472},"Delete Cache and Reconfigure.",{"type":14,"tag":100,"props":474,"children":475},{},[476,478,483],{"type":20,"value":477},"Rebuild ",{"type":14,"tag":81,"props":479,"children":481},{"className":480},[],[482],{"type":20,"value":400},{"type":20,"value":484}," project.",{"type":14,"tag":140,"props":486,"children":487},{},[488,492],{"type":14,"tag":144,"props":489,"children":491},{"src":490,"alt":7},".gitbook/assets/image (25).png",[],{"type":14,"tag":149,"props":493,"children":494},{},[],{"type":14,"tag":22,"props":496,"children":497},{},[498],{"type":20,"value":499},"You can begin coding your Shader project!",{"title":7,"searchDepth":501,"depth":501,"links":502},2,[503,504,505,506],{"id":46,"depth":225,"text":49},{"id":91,"depth":225,"text":94},{"id":154,"depth":225,"text":157},{"id":301,"depth":225,"text":304},"markdown","docs:docs:dev:shader-sdk-win.md","docs","docs/dev/shader-sdk-win.md","md",1777630727995]