Skip to content

Instantly share code, notes, and snippets.

View bdunderscore's full-sized avatar

bd_ bdunderscore

View GitHub Profile
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEditor;
[InitializeOnLoad]
public class MakeUploadsFast : MonoBehaviour
{
static MakeUploadsFast()
{
@bdunderscore
bdunderscore / gist:3481fcb92180cde9535ee8a45f99a276
Last active January 1, 2021 23:20
Instanced version of the Mobile/Particles/Additive shader
// Instanced version of the Mobile/Particles/Additive shader
// Copyright (c) 2021 bd_. MIT license
// Based on Unity built-in shader source. Copyright (c) 2016 Unity Technologies. MIT license (see license.txt)
Shader "bd_/MobileParticleAdditiveInstanced"
{
Properties
{
_MainTex ("Particle Texture", 2D) = "white" {}
#define VR_EPSILON 0.0001
#define DESKTOP_FOV 60.0
#define FOV_EPSILON 0.01
#define ROT_EPSILON 0.0001
bool isOrthographic()
{
return UNITY_MATRIX_P[3][3] == 1;
}
Texture2D _MainTex;
SamplerState sampler_point_clamp_MainTex;
SamplerState sampler_bilinear_clamp_MainTex;
float4 _MainTex_TexelSize;
fixed4 scrollcal_sample_plan(struct scrollcal_context ctx, struct scrollcal_render_plan plan) {
fixed4 bg = _MainTex.SampleLevel(sampler_bilinear_clamp_MainTex, plan.background_uv, ctx.mip);
fixed4 overlay = fixed4(0,0,0,0);
fixed4 text = fixed4(0,0,0,0);
.data_start
__refl_const_intnl_udonTypeID: %SystemInt64, null
__refl_const_intnl_udonTypeName: %SystemString, null
__0_a_Int32: %SystemInt32, null
__0_b_Int32: %SystemInt32, null
__0_c_Int32: %SystemInt32, null
__0_d_Int32: %SystemInt32, null
__1_c_Int32: %SystemInt32, null
.data_start
__refl_const_intnl_udonTypeID: %SystemInt64, null
__refl_const_intnl_udonTypeName: %SystemString, null
__0_a_Int32: %SystemInt32, null
__0_b_Int32: %SystemInt32, null
__0_d_Int32: %SystemInt32, null
__0_c_Int64: %SystemInt64, null
__0_const_intnl_SystemInt32: %SystemInt32, null
.data_start
__refl_const_intnl_udonTypeID: %SystemInt64, null
__refl_const_intnl_udonTypeName: %SystemString, null
a: %SystemInt32, null
b: %SystemInt32, null
c: %SystemInt32, null
text: %SystemString, null
__0_const_intnl_SystemInt32: %SystemInt32, null