[{"data":1,"prerenderedAt":331},["ShallowReactive",2],{"docs-\u002Fdocs\u002Fdev\u002Fshader-sdk-win":3,"docs-surround-\u002Fdocs\u002Fdev\u002Fshader-sdk-win":320},{"id":4,"title":5,"body":6,"description":16,"extension":312,"image":313,"meta":314,"navTitle":313,"navigation":315,"path":316,"seo":317,"stem":318,"__hash__":319},"docs\u002Fdocs\u002Fdev\u002Fshader-sdk-win.md","Shader SDK (WIN)",{"type":7,"value":8,"toc":305},"minimark",[9,13,17,28,33,44,58,62,87,90,101,105,114,121,132,137,142,152,162,167,174,177,187,191,202,209,231,241,248,255,262,267,270,295,302],[10,11,5],"h1",{"id":12},"shader-sdk-win",[14,15,16],"p",{},"This tutorial demonstrates How-to set up Beam Shader SDK on the Windows operating system.",[14,18,19,20,27],{},"The Shader SDK's current version can be characterized as an ",[21,22,23],"em",{},[24,25,26],"strong",{},"early developer preview",", with a high possibility of encountering unusual issues and bugs.",[29,30,32],"h3",{"id":31},"prerequisites","Prerequisites",[14,34,35,36,43],{},"To follow along, make sure you have ",[37,38,42],"a",{"href":39,"rel":40},"https:\u002F\u002Fvisualstudio.microsoft.com\u002F",[41],"nofollow","Microsoft Visual Studio"," installed. For this tutorial, I am using 2022 edition, but the community edition will work.",[14,45,46,47,52,53,57],{},"Additionally, ",[37,48,51],{"href":49,"rel":50},"https:\u002F\u002Fwww.python.org\u002Fdownloads\u002F",[41],"Python 3.x"," must be installed and available in the systems path. Verify Python is installed by entering  ",[54,55,56],"code",{},"python"," in the command line.",[29,59,61],{"id":60},"building-shader-sdk","Building Shader SDK",[63,64,65,78,81],"ol",{},[66,67,68,75],"li",{},[37,69,72],{"href":70,"rel":71},"https:\u002F\u002Fgithub.com\u002FBeamMW\u002Fshader-sdk",[41],[24,73,74],{},"Clone Shader SDK repository",[24,76,77],{},".",[66,79,80],{},"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",[66,82,83,84],{},"Change directory to the location of the shader-sdk and run: ",[54,85,86],{},"shade init",[14,88,89],{},"This will operation will install and build all the necessary components.",[91,92,93,98],"figure",{},[94,95],"img",{"src":96,"alt":97},".gitbook\u002Fassets\u002Fimage (8).png","",[99,100],"figcaption",{},[29,102,104],{"id":103},"creating-a-new-shader-project","Creating a new Shader Project",[63,106,107],{},[66,108,109,110,113],{},"Launch the Command Prompt, creating a new folder for your Shader project. We will use the ",[54,111,112],{},"vault"," folder for this tutorial:",[91,115,116,119],{},[94,117],{"src":118,"alt":97},".gitbook\u002Fassets\u002Fimage (19).png",[99,120],{},[14,122,123,124,127,128,131],{},"2. Locate ",[54,125,126],{},"shader-sdk"," and ",[54,129,130],{},"wasi-sdk","folders, and enter the following:",[14,133,134],{},[54,135,136],{},"set BEAM_SHADER_SDK=c:\\Code\\shader-sdk",[14,138,139],{},[54,140,141],{},"set WASI_SDK_PREFIX=C:\\Code\\shader-sdk\\wasi-sdk-14.0",[63,143,145],{"start":144},3,[66,146,147,148,151],{},"To initialize the structure of your Shader, enter  ",[54,149,150],{},"shade create_project \u003Cproject name>",":",[14,153,154,155,158,159,161],{},"For our ",[54,156,157],{},"\u003Cproject name>",", use ",[54,160,112],{},", i.e.,:",[14,163,164],{},[54,165,166],{},"c:\\Code\\shader-sdk\\shade create_project vault",[91,168,169,172],{},[94,170],{"src":171,"alt":97},".gitbook\u002Fassets\u002Fimage (4).png",[99,173],{},[14,175,176],{},"If initialized correctly, your Shader project structure should resemble the following:",[91,178,179,182],{},[94,180],{"src":181,"alt":97},".gitbook\u002Fassets\u002Fimage (1).png",[99,183,184],{},[14,185,186],{},"Vault project structure",[29,188,190],{"id":189},"building-the-shader-project","Building the Shader Project",[14,192,193,194,197,198,201],{},"In Visual Studio, locate ",[24,195,196],{},"Open A Local Folder"," from the ",[24,199,200],{},"Start"," menu:",[91,203,204,207],{},[94,205],{"src":206,"alt":97},".gitbook\u002Fassets\u002Fimage (23).png",[99,208],{},[14,210,211,212,215,216,219,220,127,223,226,227,230],{},"Navigate to your Shader project folder, click ",[24,213,214],{},"Select Folder"," to initialize a ",[24,217,218],{},"CMake project",", creating ",[54,221,222],{},"CMakeLists.txt",[54,224,225],{},"CMakeLists.json"," files will be seen in the ",[24,228,229],{},"Solution Explorer"," for your Shader project:",[91,232,233,236],{},[94,234],{"src":235,"alt":97},".gitbook\u002Fassets\u002Fimage (10).png",[99,237,238],{},[14,239,240],{},"Vault Solution Explorer",[14,242,243,244,247],{},"Select ",[54,245,246],{},"wasm32-Release"," build configuration:",[91,249,250,253],{},[94,251],{"src":252,"alt":97},".gitbook\u002Fassets\u002Fimage (13).png",[99,254],{},[14,256,257,258,261],{},"This will build ",[54,259,260],{},".wasm"," files following this folder structure:",[14,263,264],{},[54,265,266],{},"C:\\Code\\vault\\build\\wasi\\shaders",[14,268,269],{},"If you are encountering errors, try the following before reaching out to support:",[63,271,272,279,289],{},[66,273,274,275,278],{},"Open Windows Explorer and delete the ",[54,276,277],{},"out"," folder.",[66,280,281,282,285,286],{},"In the  ",[24,283,284],{},"Project"," menu, select ",[24,287,288],{},"Delete Cache and Reconfigure.",[66,290,291,292,294],{},"Rebuild ",[54,293,246],{}," project.",[91,296,297,300],{},[94,298],{"src":299,"alt":97},".gitbook\u002Fassets\u002Fimage (25).png",[99,301],{},[14,303,304],{},"You can begin coding your Shader project!",{"title":97,"searchDepth":306,"depth":306,"links":307},2,[308,309,310,311],{"id":31,"depth":144,"text":32},{"id":60,"depth":144,"text":61},{"id":103,"depth":144,"text":104},{"id":189,"depth":144,"text":190},"md",null,{},true,"\u002Fdocs\u002Fdev\u002Fshader-sdk-win",{"title":5,"description":16},"docs\u002Fdev\u002Fshader-sdk-win","fOtcFu-HuUJmthjxOYwV5v3uz0QYbN18xa-qw2XajLQ",[321,326],{"title":322,"path":323,"stem":324,"description":325,"children":-1},"Shader SDK (MAC)","\u002Fdocs\u002Fdev\u002Fshader-sdk-mac","docs\u002Fdev\u002Fshader-sdk-mac","In this tutorial we will show how to setup Beam Shader SDK on Mac OS",{"title":327,"path":328,"stem":329,"description":330,"children":-1},"Using Beam Shaders","\u002Fdocs\u002Fdev\u002Fusing-beam-shaders","docs\u002Fdev\u002Fusing-beam-shaders","This tutorial describes using Beam Shaders on DAppnet",1783006054306]