Commit b0ba577a authored by Gargaj's avatar Gargaj
Browse files

add variables to shaders

parent 1ca7184b
......@@ -111,6 +111,7 @@ namespace Renderer
"uniform vec2 v2Resolution; // viewport resolution (in pixels)\n"
"\n"
"uniform sampler1D texFFT; // towards 0.0 is bass / lower freq, towards 1.0 is higher / treble freq\n"
"uniform sampler1D texFFTSmoothed; // this one has longer falloff and less harsh transients\n"
"{%textures:begin%}" // leave off \n here
"uniform sampler2D {%textures:name%};\n"
"{%textures:end%}" // leave off \n here
......
......@@ -106,6 +106,7 @@ namespace Renderer
"Texture2D {%textures:name%};\n"
"{%textures:end%}" // leave off \n here
"Texture1D texFFT; // towards 0.0 is bass / lower freq, towards 1.0 is higher / treble freq\n"
"Texture1D texFFTSmoothed; // this one has longer falloff and less harsh transients\n"
"SamplerState smp;\n"
"\n"
"cbuffer constants\n"
......
......@@ -103,6 +103,8 @@ namespace Renderer
char defaultShader[65536] =
"texture texTFFT; sampler1D texFFT = sampler_state { Texture = <texTFFT>; }; \n"
"// towards 0.0 is bass / lower freq, towards 1.0 is higher / treble freq\n"
"texture texFFTSmoothedT; sampler1D texFFTSmoothed = sampler_state { Texture = <texFFTSmoothedT>; }; \n"
"// this one has longer falloff and less harsh transients\n"
"\n"
"{%textures:begin%}" // leave off \n here
"texture raw{%textures:name%}; sampler2D {%textures:name%} = sampler_state { Texture = <raw{%textures:name%}>; };\n"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment