- Conference With Developers 2
- あくまで個人のメモです。誤りありましたら教えてくださいmm (@himara2)
- 資料はこちら
- ninjinkunさん
| #version 420 core | |
| uniform float fGlobalTime; // in seconds | |
| uniform vec2 v2Resolution; // viewport resolution (in pixels) | |
| uniform float fFrameTime; // duration of the last frame, in seconds | |
| uniform sampler1D texFFT; // towards 0.0 is bass / lower freq, towards 1.0 is higher / treble freq | |
| uniform sampler1D texFFTSmoothed; // this one has longer falloff and less harsh transients | |
| uniform sampler1D texFFTIntegrated; // this is continually increasing | |
| uniform sampler2D texPreviousFrame; // screenshot of the previous frame | 
| using System.Reflection; | |
| using System.Collections; | |
| using System.Collections.Generic; | |
| using UnityEngine; | |
| using UnityEngine.Rendering; | |
| using UnityEngine.Rendering.Universal; | |
| using UnityEngine.UI; | |
| #if DEBUG | 
| // Commented version of https://twitter.com/zozuar/status/1441384708441456651 | |
| // Google-translated (with some editing) from @gam0022's version | |
| float i, // Ray marching loop counter | |
| e, // Volume density (the smaller the value, the higher the density) | |
| s, // FBM scale (and loop counter) | |
| g, // Ray's distance (also used for tunnel twirl and camera prespective) | |
| k = .01; // Handy constant | |
| // Ray marching loop | 
| // https://www.youtube.com/watch?v=H8UqnTE3mUY より引用 | |
| #define A for(int i=0;i<9;++i){int y=p>>((p>>19)+i&3),z=p*((878086607>>(i&7)*4)&15)*(510+1%5)>>14;if((p>>15&1<<(i&15))>0)s.y+=float(((y>>7&z*3|y>>11&z*6)&1023)-512)/3e4;} | |
| vec2 mainSound(float t){int p=int(t*144e3);vec2 s;A;s.yx=s;p-=65536;A;return s*mat2(7,1,5,-3);} | 
| #version 410 core | |
| uniform float fGlobalTime; // in seconds | |
| uniform vec2 v2Resolution; // viewport resolution (in pixels) | |
| uniform sampler1D texFFT; // towards 0.0 is bass / lower freq, towards 1.0 is higher / treble freq | |
| uniform sampler1D texFFTSmoothed; // this one has longer falloff and less harsh transients | |
| uniform sampler1D texFFTIntegrated; // this is continually increasing | |
| uniform sampler2D texChecker; | |
| uniform sampler2D texNoise; | 
| #version 300 es | |
| precision highp float; | |
| //invariant gl_FragCoord; | |
| uniform Screen { | |
| vec2 wh; | |
| } screen; | |
| uniform Timer { | |
| int count; | 
| 1: precision highp float; | |
| 2: precision highp int; | |
| 3: #define SHADER_NAME ShaderMaterial | |
| 4: #define VERTEX_TEXTURES | |
| 5: #define GAMMA_FACTOR 2 | |
| 6: #define MAX_DIR_LIGHTS 0 | |
| 7: #define MAX_POINT_LIGHTS 0 | |
| 8: #define MAX_SPOT_LIGHTS 0 | |
| 9: #define MAX_HEMI_LIGHTS 0 | |
| 10: #define MAX_SHADOWS 0 | 
| cat <(printf "\xEF\xBB\xBF") 元のUTF-8ファイル.txt > BOM付きUTF-8ファイル.txt | 
この記事は、C++ (fork) Advent Calendar 2013の12日目の記事です。
記事を書く人が居ないみたいなので、C++初心者ですが箸休め的な記事を書こうと思い立ち、いざ書き上げてみたら思いの外長くなりました。
この記事は、C++初心者な著者が、C++を用いて競技プログラミングをするために、調べたことや試した事などのまとめです。 記事中に誤り、問題点やご指摘、ご質問等ありましたら、@rigibunまでご連絡下さい(特にpush_bach)
githubのmarkdownを使いたかったことと、変更履歴が見られることからgistで書きました。