.link = shader_scene_fxglow_link,
.vs =
{
-.orig_file = "shaders/scene.vs",
+.orig_file = "shaders/scene_fxglow.vs",
.static_src =
"layout (location=0) in vec3 a_co;\n"
"layout (location=1) in vec4 a_norm;\n"
"uniform mat4x3 uMdl;\n"
"uniform mat4 uPv;\n"
"uniform mat4 uPvmPrev;\n"
+"uniform vec2 uUvOffset;\n"
"\n"
"out vec2 aUv;\n"
"out vec4 aNorm;\n"
"\n"
" gl_Position = vproj0;\n"
"\n"
-" aUv = a_uv;\n"
+" aUv = a_uv + uUvOffset;\n"
" aNorm = vec4( mat3(uMdl) * a_norm.xyz, a_norm.w );\n"
" aCo = a_co;\n"
" aWorldCo = world_pos0;\n"
static GLuint _uniform_scene_fxglow_uMdl;
static GLuint _uniform_scene_fxglow_uPv;
static GLuint _uniform_scene_fxglow_uPvmPrev;
+static GLuint _uniform_scene_fxglow_uUvOffset;
static GLuint _uniform_scene_fxglow_uTexMain;
static GLuint _uniform_scene_fxglow_uCamera;
static GLuint _uniform_scene_fxglow_g_world_depth;
static void shader_scene_fxglow_uPvmPrev(m4x4f m){
glUniformMatrix4fv(_uniform_scene_fxglow_uPvmPrev,1,GL_FALSE,(float*)m);
}
+static void shader_scene_fxglow_uUvOffset(v2f v){
+ glUniform2fv(_uniform_scene_fxglow_uUvOffset,1,v);
+}
static void shader_scene_fxglow_uTexMain(int i){
glUniform1i(_uniform_scene_fxglow_uTexMain,i);
}
_uniform_scene_fxglow_uMdl = glGetUniformLocation( _shader_scene_fxglow.id, "uMdl" );
_uniform_scene_fxglow_uPv = glGetUniformLocation( _shader_scene_fxglow.id, "uPv" );
_uniform_scene_fxglow_uPvmPrev = glGetUniformLocation( _shader_scene_fxglow.id, "uPvmPrev" );
+ _uniform_scene_fxglow_uUvOffset = glGetUniformLocation( _shader_scene_fxglow.id, "uUvOffset" );
_uniform_scene_fxglow_uTexMain = glGetUniformLocation( _shader_scene_fxglow.id, "uTexMain" );
_uniform_scene_fxglow_uCamera = glGetUniformLocation( _shader_scene_fxglow.id, "uCamera" );
_uniform_scene_fxglow_g_world_depth = glGetUniformLocation( _shader_scene_fxglow.id, "g_world_depth" );