Skip to content

Instantly share code, notes, and snippets.

View yuiwong's full-sized avatar
🏠
Oooops!

Yui Wong yuiwong

🏠
Oooops!
View GitHub Profile
@bgolus
bgolus / InfiniteGrid.shader
Last active November 20, 2024 01:20
Infinite Grid shader with procedural grid with configurable divisions and major and minor lines markings.
Shader "Unlit/InfiniteGrid"
{
Properties
{
[Toggle] _WorldUV ("Use World Space UV", Float) = 1.0
_GridScale ("Grid Scale", Float) = 1.0
_GridBias ("Grid Bias", Float) = 0.5
_GridDiv ("Grid Divisions", Float) = 10.0
_BaseColor ("Base Color", Color) = (0,0,0,1)
_LineColor ("Line Color", Color) = (1,1,1,1)
@mmozeiko
mmozeiko / preview.c
Last active October 12, 2024 23:38
windows shell preview handler example
// example of using Windows Preview Handler
// https://learn.microsoft.com/en-us/windows/win32/shell/preview-handlers
#define COBJMACROS
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#include <shlwapi.h>
#include <shellapi.h>
#include <shobjidl.h>
@KrisCris
KrisCris / PreventBiliBiliReplyJumpURL.js
Created July 21, 2022 04:46
PreventBiliBiliReplyJumpURL, 禁用b站评论区自动话题 (带蓝色搜索icon超链接的词条)
// ==UserScript==
// @name 禁用b站评论区自动话题 (带蓝色搜索icon超链接的词条)
// @namespace https://greasyfork.org/zh-CN/scripts/447612-%E5%B9%B2%E6%8E%89%E6%96%B0%E7%89%88b%E7%AB%99%E8%AF%84%E8%AE%BA%E5%8C%BA%E7%9A%84%E6%90%9C%E7%B4%A2-%E6%94%BE%E5%A4%A7%E9%95%9C-%E8%93%9D%E5%AD%97-%E5%8A%9F%E8%83%BD
// @version 1.0
// @description 禁用b站评论区自动话题 (带蓝色搜索icon超链接的词条)
// @author DuckBurnIncense, MODIFIED BY KrisCris
// @match *://www.bilibili.com/video/*
// @icon https://www.bilibili.com/favicon.ico
// @grant none
// @homepage //duckburnincense.ml/
@drrost
drrost / leacks_cheker_ex.c
Last active March 19, 2025 15:07
Extended version of memory leaks checker. Shows the place where memory was allocated.
//
// Created by Rostyslav Druzhchenko on 05.09.2020.
//
#include <stdio.h>
#include <dlfcn.h>
#include <execinfo.h>
#include <string.h>
#include <stdlib.h>
@raysan5
raysan5 / custom_game_engines_small_study.md
Last active April 24, 2025 05:27
A small state-of-the-art study on custom engines

CUSTOM GAME ENGINES: A Small Study

a_plague_tale

A couple of weeks ago I played (and finished) A Plague Tale, a game by Asobo Studio. I was really captivated by the game, not only by the beautiful graphics but also by the story and the locations in the game. I decided to investigate a bit about the game tech and I was surprised to see it was developed with a custom engine by a relatively small studio. I know there are some companies using custom engines but it's very difficult to find a detailed market study with that kind of information curated and updated. So this article.

Nowadays lots of companies choose engines like Unreal or Unity for their games (or that's what lot of people think) because d

@nothings
nothings / gist:ef38135f4aa4799e8f09069a44ded5a2
Created October 21, 2019 00:26
current stb_platform API structure
typedef struct {
float seconds_delta;
double seconds;
stbp_uint64 ns;
stbp_uint64 ns_delta;
stbp_uint64 ms;
stbp_uint64 ms_delta;
} stbp_time_info;
typedef struct {
@keijiro
keijiro / 00_FlipCheck.shader.md
Last active July 5, 2018 11:02
A Unity shader that detects flipped polygons.

screenshot

@nothings
nothings / kotaku_hzd.md
Last active September 4, 2024 06:33
Why Frustum Culling Matters, and Why It's Not Important

There is a nice GIF illustrating a technique called "frustum culling" in this Kotaku article: http://kotaku.com/horizon-zero-dawn-uses-all-sorts-of-clever-tricks-to-lo-1794385026

The interwebs being what they are, this has also led to some controversy.

Some people have interpreted the opening sentence "Every time you move the camera in Horizon Zero Dawn, the game is doing all sorts of under-the-hood calculations, loading and unloading chunks of world to ensure that it all runs properly," as being about the GIF; that's not what frustum culling does, but that's probably not what the article's author meant anyway.

@dskjal
dskjal / ikfk_snap_easy.py
Last active October 26, 2021 21:47
Blender で IK/FK スナップスクリプト簡易版
# ##### BEGIN GPL LICENSE BLOCK #####
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
@rioki
rioki / dbg.h
Created January 9, 2017 10:51
Debug Helpers
//
// Debug Helpers
//
// Copyright (c) 2015 - 2017 Sean Farrell <[email protected]>
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is