This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# pull ubuntu 18.04 as base image | |
FROM nvidia/cuda:11.3.0-devel-ubuntu20.04 | |
RUN echo "start building..." | |
# update packages | |
RUN set -x && \ | |
apt update && \ | |
apt upgrade -y |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 必要なライブラリをインポート | |
import sys | |
from googleapiclient.discovery import build | |
from googleapiclient.errors import HttpError | |
# Google APIキーを指定 | |
api_key = 'XXXXXXXXXXXXXXXXXXXXXXXXXX' | |
# 動画タイトルを取得する関数 | |
def get_channel_videos(channel_id, num): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// base : https://qiita.com/townsoft/items/dd5cbd8be7590e12f3cf | |
#if UNITY_ANDROID | |
using Unity.Notifications.Android; | |
#endif | |
#if UNITY_IOS | |
using Unity.Notifications.iOS; | |
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Shader "Custom/InstancedIndirectColor" | |
{ | |
SubShader | |
{ | |
CGINCLUDE | |
#include "UnityCG.cginc" | |
#include "Lighting.cginc" | |
#include "AutoLight.cginc" | |
#include "UnityLightingCommon.cginc" | |
struct MeshProperties { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
public class DrawMeshInstancedIndirect_demo : MonoBehaviour | |
{ | |
public int count = 10000; | |
public float radius = 10; | |
public Mesh copyMesh; | |
public Material material; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Shader "Custom/InstancedColorV2" | |
{ | |
SubShader | |
{ | |
CGINCLUDE | |
#include "UnityCG.cginc" | |
#include "Lighting.cginc" | |
#include "AutoLight.cginc" | |
ENDCG |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
using UnityEngine.Rendering; | |
public class DrawMeshInstanced_demo2 : MonoBehaviour | |
{ | |
public int count = 1000; | |
public float radius = 5; | |
public Mesh copyMesh; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Shader "Custom/InstancedColor" | |
{ | |
SubShader | |
{ | |
CGINCLUDE | |
#include "UnityCG.cginc" | |
ENDCG | |
Pass | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
using UnityEngine.Rendering; | |
public class DrawMeshInstanced_demo : MonoBehaviour | |
{ | |
[SerializeField] private int count = 1000; | |
[SerializeField] private float radius = 5; | |
[SerializeField] private Mesh copyMesh; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let gridScale = 2.1; | |
let border = 2.7; | |
let maxCount = 150; | |
function getRealPart(x) { | |
let rp = -1/2 + 1.0 * x / width; | |
let s = height / width; | |
return rp * gridScale/s; | |
} |
NewerOlder