Standard escape codes are prefixed with Escape:
- Ctrl-Key:
^[ - Octal:
\033 - Unicode:
\u001b - Hexadecimal:
\x1B - Decimal:
27
| // Copyright 2015 The Freetype-Go Authors. All rights reserved. | |
| // Use of this source code is governed by your choice of either the | |
| // FreeType License or the GNU General Public License version 2 (or | |
| // any later version), both of which can be found in the LICENSE file. | |
| // +build example | |
| // | |
| // This build tag means that "go install github.com/golang/freetype/..." | |
| // doesn't install this example program. Use "go run main.go" to run it or "go | |
| // install -tags=example" to install it. |
| package main | |
| import ( | |
| "fmt" | |
| "image" | |
| "image/color" | |
| "image/gif" | |
| "math" | |
| "os" | |
| ) |
| #!/bin/bash | |
| export __NV_PRIME_RENDER_OFFLOAD=1 | |
| export __GLX_VENDOR_LIBRARY_NAME=nvidia | |
| export __VK_LAYER_NV_optimus=NVIDIA_only | |
| export VK_ICD_FILENAMES=/usr/share/vulkan/icd.d/nvidia_icd.json | |
| exec "$@" |
| In shader programming, you often run into a problem where you want to iterate an array in memory over all pixels in a compute shader | |
| group (tile). Tiled deferred lighting is the most common case. 8x8 tile loops over a light list culled for that tile. | |
| Simplified HLSL code looks like this: | |
| Buffer<float4> lightDatas; | |
| Texture2D<uint2> lightStartCounts; | |
| RWTexture2D<float4> output; | |
| [numthreads(8, 8, 1)] |