Skip to content

Instantly share code, notes, and snippets.

View shiena's full-sized avatar

KOGA Mitsuhiro shiena

View GitHub Profile
@MichaelMoroz
MichaelMoroz / BH.shader
Last active November 6, 2024 09:57
VR Schwarzschild black hole shader (works with SPS and SPS-I)
Shader "Misha/Schwartzschild"
{
Properties
{
[Header(Black Hole)]
_EventHorizonRadius("Event Horizon Radius", Range(0.0, 0.5)) = 0.075
[Header(Accretion)]
[HDR] _AccretionColor("Color", Color) = (1,1,1,1)
@elementbound
elementbound / proximity-fade.gdshaderinc
Last active August 26, 2024 03:11
Proximity Fade shader include for Godot
/**
* Proximity Fade shader include
*
* Based on Godot's proximity fade shader feature:
* https://github.com/godotengine/godot/blob/97b8ad1af0f2b4a216f6f1263bef4fbc69e56c7b/scene/resources/material.cpp#L1643
*
* Usage:
// Include snippet
#include "proximity-fade.gdshaderinc"
using System;
using System.Net;
using System.Net.Http;
using System.Runtime.CompilerServices;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using UnityEngine;
using UnityEngine.Networking;
import SwiftUI
struct ContentView: View {
@State var theta: Double = 0
let radius: Double = 60
let colors: [Color] = [.purple, .red, .yellow, .blue, .green]
var body: some View {
ZStack {
ForEach(Array(colors.enumerated()), id: \.offset) { offset, style in
@TakaakiIchijo
TakaakiIchijo / UnityNetcodeForGameObjectsObservableTriggerExtensions.cs
Last active February 14, 2024 05:38
A piece of R3 extensions for Netcode for GameObjects
using Unity.Netcode;
namespace R3.Trigger
{
public static class UnityNetcodeR3Extensions
{
public static Observable<(T previousValue, T newValue)> AsObservable<T>(this NetworkVariable<T> networkVariable)
{
return Observable.FromEvent<NetworkVariable<T>.OnValueChangedDelegate, (T, T)>(
h => (previousValue, newValue) => h((previousValue, newValue)),
@reduz
reduz / godot_vision_pro.md
Last active October 15, 2024 03:00
Godot on Vision Pro and similar devices

Vision Pro style API on Godot

Overview

Apple recently unveiled the Vision Pro. This type of device is mostly designed for augmented reality (AR), in the sense that it should be able to throw 3D models and rendering combined into a camera.

Normally with pass-through AR, one would expect to get the camera feed as an image and maybe some environment cubemap generated from the camera to apply proper lighting into the objects.

@ymmt2005
ymmt2005 / howto-tech-docs.md
Last active July 16, 2024 04:07
技術文書の書き方

技術文書の書き方

このメモは、私(@ymmt2005)が長年にわたってソフトウェアプロダクト開発に関わってきて 2022年現在こうしたほうが良いと考えているベストプラクティスです。

科学的な分析等に基づくわけではない経験則であるため、今後も随時見直すことがありますし、 ここに書いてあることが常に正しいわけでもあらゆるソフトウェア開発に適するわけでもありません。

しかしながら、実務経験が豊富で、モダンな技術スタックに明るいエンジニアの経験則は一定の 役に立つのではないかと考えて記します。

@ityonemo
ityonemo / test.md
Last active October 25, 2024 15:24
Zig in 30 minutes

A half-hour to learn Zig

This is inspired by https://fasterthanli.me/blog/2020/a-half-hour-to-learn-rust/

Basics

the command zig run my_code.zig will compile and immediately run your Zig program. Each of these cells contains a zig program that you can try to run (some of them contain compile-time errors that you can comment out to play with)

@richlander
richlander / modernizing-csharp9.md
Last active April 26, 2024 17:14
Modernizing a codebase for C# 9

Modernizing a codebase for C# 9

There are lots of cases that you can improve. The examples use nullable reference types, but only the WhenNotNull example requires it.

Use the property pattern to replace IsNullorEmpty

Consider adopting the new property pattern, wherever you use IsNullOrEmpty.

string? hello = "hello world";