Skip to content
Snippets Groups Projects
Commit e994db59 authored by DarkGod's avatar DarkGod
Browse files

test

parent fed0e3d4
No related branches found
No related tags found
No related merge requests found
......@@ -13,6 +13,7 @@ uniform float llpow;
uniform sampler2D mainfbo;
uniform vec2 mapCoord;
uniform vec2 texSize;
uniform vec4 displayColor;
void main(void)
{
......@@ -55,5 +56,5 @@ void main(void)
c.rgb *= color;
// gl_FragColor = c;
gl_FragColor = texture2D(mainfbo, vec2(gl_TexCoord[0].x * texSize.x / mapCoord.x, gl_TexCoord[0].y * texSize.y / mapCoord.y));
gl_FragColor = texture2D(mainfbo, vec2(gl_TexCoord[0].x * displayColor.x / texSize.x + mapCoord.x / texSize.x, (1-gl_TexCoord[0].y) * displayColor.y / texSize.y + mapCoord.y / texSize.y));
}
......@@ -206,7 +206,10 @@ static int particles_to_screen(lua_State *L)
glScalef(ps->zoom * zoom, ps->zoom * zoom, ps->zoom * zoom);
glRotatef(ps->rotate, 0, 0, 1);
if (ps->shader) useShader(ps->shader, x, y, main_fbo ? main_fbo->w : 1, main_fbo ? main_fbo->h : 1, 1, 1, 1, 1);
if (ps->shader) {
particle_type *p = &ps->particles[0];
useShader(ps->shader, x, y, main_fbo ? main_fbo->w : 1, main_fbo ? main_fbo->h : 1, p->size, p->size, 1, 1);
}
int remaining = ps->batch_nb;
while (remaining >= PARTICLES_PER_ARRAY)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment