more fine tuning and removed test code.
This commit is contained in:
parent
03998dc74a
commit
e1102e3231
2 changed files with 9 additions and 12 deletions
|
@ -26,8 +26,8 @@ void main()
|
|||
decay = ageMod / halfAge;
|
||||
|
||||
// faster particles are smaller
|
||||
float speedScale = (1.0 - 0.8*length(in_velocity)/maxVelocity);
|
||||
float finalSize = size * speedScale;
|
||||
float scaleBySpeed = (1.0 - 0.95*length(in_velocity)/maxVelocity);
|
||||
float finalSize = size * scaleBySpeed;
|
||||
vec2 base = in_vertex;
|
||||
vec3 p = finalSize*vec3(base, 0.0);
|
||||
vec3 offset = (0.2*age + log(1.0+age*5.0)) * in_velocity + in_position;
|
||||
|
|
|
@ -51,9 +51,9 @@ namespace endofthejedi {
|
|||
// TODO: add dust particles
|
||||
// TODO: add little rocks flying around
|
||||
|
||||
//glClearColor(0.0, 0.0, 0.0, 1.0);
|
||||
float s = 0.1;
|
||||
glClearColor(s, s, s, 1.0);
|
||||
glClearColor(0.0, 0.0, 0.0, 1.0);
|
||||
//float s = 0.1;
|
||||
//glClearColor(s, s, s, 1.0);
|
||||
|
||||
m_shader.bind();
|
||||
|
||||
|
@ -69,10 +69,8 @@ namespace endofthejedi {
|
|||
renderPlanets();
|
||||
renderShips();
|
||||
renderMissiles();
|
||||
|
||||
renderParticles();
|
||||
|
||||
//renderTraces();
|
||||
renderTraces();
|
||||
|
||||
//glColor3f(1.0, 0.0, 0.0);
|
||||
//glBegin(GL_QUADS);
|
||||
|
@ -97,7 +95,7 @@ namespace endofthejedi {
|
|||
{
|
||||
//float particleRadius = 0.005;
|
||||
//float particleRadius = 0.003;
|
||||
float particleRadius = 0.007;
|
||||
float particleRadius = 0.005;
|
||||
|
||||
// TODO: use this as shader input too and make the area 2x around this
|
||||
// so that it stays hot/yellow for 2/3 of the time
|
||||
|
@ -142,7 +140,7 @@ namespace endofthejedi {
|
|||
}
|
||||
|
||||
if (!gotIt) {
|
||||
addExplosionEffect(expl->id, expl->position, 500, 0.5);
|
||||
addExplosionEffect(expl->id, expl->position, 1000, 1.0);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -247,8 +245,7 @@ namespace endofthejedi {
|
|||
glm::mat4 RendererPolygon3d::computeModelMatrix(const game::Ship *ship)
|
||||
{
|
||||
// TODO: rotate them before shooting, that looks better
|
||||
//glm::mat4 mat = computeModelMatrix(ship->position, m_state->shipRadius());
|
||||
glm::mat4 mat = computeModelMatrix(ship->position, 5.0*m_state->shipRadius());
|
||||
glm::mat4 mat = computeModelMatrix(ship->position, m_state->shipRadius());
|
||||
|
||||
// XXX model is flipped
|
||||
//glm::mat4 mat = computeModelMatrix(ship->position, 0.3);
|
||||
|
|
Loading…
Reference in a new issue