Skip to content

Instantly share code, notes, and snippets.

View mifth's full-sized avatar

mifth mifth

View GitHub Profile
@BlurryLight
BlurryLight / qrenderdoc.pyi
Created June 17, 2023 09:08
RenderDoc Python API Stubs
from typing import Any, ClassVar
from typing import overload
import collections
import enum
import importlib._bootstrap
class APIInspector(SwigPyObject):
this: Any
thisown: Any
@rngtm
rngtm / TriangleTile.hlsl
Created July 17, 2021 03:47
Unity2021 ShaderGraph用 三角形タイル カスタムノード
void TriangleTile_float(
float2 UV,
float Scale,
out float Triangle,
out float2 TrianglePosition
)
{
#define N Scale
float2 p = UV;
p.x *= 0.86602; // sqrt(3)/2倍
@rngtm
rngtm / HexagonTile.hlsl
Last active May 10, 2024 04:56
Unity ShaderGraphのCustomFunctionで六角形タイルを作るためのHLSLファイル
void HexagonTile_float(
float2 UV,
float Scale,
out float Hexagon, // 六角形
out float2 HexPos, // 六角形の位置
out float2 HexUV, // 六角形内のUVを出力
out float2 HexIndex // 六角形の番号
)
{
///////////////////////////////////////////////////////////////////
@GregMalick
GregMalick / shootRay
Last active September 24, 2019 11:25
''' this Command fires a ray down the +Z axis of a locator at a mesh
and selects any poly that the ray intersects
does not yet handle animated positions
Command format:
shootRay LocatorName MeshName '''
NAME_CMD_SHOOTRAY = "shootRay"
NAME_ARG_LOCATOR = "StrLocatorName"
NAME_ARG_MESH = "StrMeshName"