Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
PoroCYon
Bonzomatic
Commits
b0ba577a
Commit
b0ba577a
authored
Mar 07, 2015
by
Gargaj
Browse files
add variables to shaders
parent
1ca7184b
Changes
3
Hide whitespace changes
Inline
Side-by-side
platform_sdl/Renderer.cpp
View file @
b0ba577a
...
...
@@ -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
...
...
platform_w32_dx11/Renderer.cpp
View file @
b0ba577a
...
...
@@ -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
"
...
...
platform_w32_dx9/Renderer.cpp
View file @
b0ba577a
...
...
@@ -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
"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment