This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| void Shader::compile(VkDevice * device,const std::string source_name, shaderc_shader_kind kind, const std::string source, | |
| bool optimize) { | |
| shaderc::Compiler compiler; | |
| shaderc::CompileOptions options; | |
| if(optimize){ | |
| options.SetOptimizationLevel(shaderc_optimization_level_size); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import * as vscode from 'vscode'; | |
| import {existsSync,promises,readFileSync} from "fs" | |
| import {resolve, posix, normalize} from "path" | |
| let getFiles = async(dir) =>{ | |
| const dirents = await promises.readdir(dir,{ | |
| withFileTypes:true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import json, os | |
| # adapted from here with minor tweaks | |
| # https://github.com/sideeffects/GameDevelopmentToolset/blob/Development/otls/rop_csv_exporter.hda/gamedev_8_8Driver_1rop__csv__exporter/PythonModule#L43 | |
| # needs a bit more work to make it better but works well enough for now. | |
| node = hou.pwd() | |
| geo = node.geometry() | |
| filename = "./tester.json" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import * as React from "react" | |
| import {useEffect, useMemo,} from "react" | |
| import {Sphere, Vector2, GLSL3} from "three"; | |
| import {useThree} from "@react-three/fiber"; | |
| /** | |
| * A port of a-big-triangle to react-three-fiber. | |
| * | |
| * https://github.com/mikolalysenko/a-big-triangle | |
| * |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const Builder = @import("std").build.Builder; | |
| const std = @import("std"); | |
| pub const OptionsStep = @import("std").build.OptionsStep; | |
| pub fn build(b: *Builder) void { | |
| var option = b.option(bool,"Desktop", "Set to true to build desktop focused library"); | |
| if(option == true){ | |
| std.log.info("TODO",.{}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import React, {useMemo} from "react"; | |
| import pack from "pack-spheres" | |
| import {SphereGeometry, GLSL3, InstancedBufferAttribute} from "three" | |
| export default function (props) { | |
| const { | |
| numInstances = 1000, | |
| dimensions = 3, | |
| packAttempts = 500, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Builds instanced data for the packing | |
| const objdata = useMemo(() => { | |
| let sphere = new SphereGeometry(1, widthSegments, heightSegments); | |
| // build colors | |
| let palette = colors({ | |
| numberOfValues: 20 | |
| }) | |
| const settings = { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { | |
| Constants, | |
| Color4, | |
| Mesh, | |
| Scene, | |
| RenderTargetTexture, | |
| Engine, | |
| Vector3, | |
| UniversalCamera, | |
| RawTexture, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| cmake_minimum_required(VERSION 3.25) | |
| project(dawn_compile) | |
| set(CMAKE_CXX_STANDARD 17) | |
| add_executable(dawn_compile main.cpp) | |
| include_directories(dawn_compile ${CMAKE_CURRENT_SOURCE_DIR}/libraries/dawn/include) | |
| include_directories(dawn_compile ${CMAKE_CURRENT_SOURCE_DIR}/libraries/dawn/gen/include) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Example of how to find indices to values in a 2D array that are below a specified index. | |
| /* | |
| Take the following | |
| [0,1,2,3 | |
| 4,5,6,7 | |
| 8,9,10,11] | |
| This formula helps you figure out, for instance, what the index of 4 is if we're looking at index 0. | |