Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff --git a/src/LmrModel.cpp b/src/LmrModel.cpp
- index 2bdd9c2..86eea1a 100644
- --- a/src/LmrModel.cpp
- +++ b/src/LmrModel.cpp
- @@ -55,13 +55,13 @@ namespace ShipThruster {
- static void Init() {
- thrusterProg = new Render::Shader("flat", "#define TEXTURE0 1\n");
- - thrusTex = s_textureCache->GetModelTexture(PIONEER_DATA_DIR"/textures/thruster.png");
- + thrusTex = s_textureCache->GetModelTexture(PIONEER_DATA_DIR "/textures/thruster.png");
- thrusTex->Bind();
- thrusTex->SetWrapMode(Texture::CLAMP);
- - glowTex = s_textureCache->GetModelTexture(PIONEER_DATA_DIR"/textures/halo.png");
- + glowTex = s_textureCache->GetModelTexture(PIONEER_DATA_DIR "/textures/halo.png");
- glowTex->Bind();
- - thrusTex->SetWrapMode(Texture::CLAMP);
- + glowTex->SetWrapMode(Texture::CLAMP);
- glowTex->Unbind();
- //zero at thruster center
- @@ -188,8 +188,8 @@ namespace ShipThruster {
- vector3f viewdir = vector3f(-mv[2], -mv[6], -mv[10]).Normalized();
- vector3f cdir(0.f, 0.f, -1.f);
- //fade thruster out, when directly facing it
- - float glow = 1.0 - Clamp(viewdir.Dot(cdir), 0.f, 1.f);
- - color.a = pow(glow, 0.2f);
- + float glow = 1.0 - Clamp(pow(viewdir.Dot(cdir), len*2), 0.f, 1.f);
- + color.a = glow;//pow(glow, 0.1f);
- thrusTex->Bind();
- Render::State::UseProgram(thrusterProg);
- thrusterProg->SetUniform("texture0", 0);
- @@ -206,8 +206,8 @@ namespace ShipThruster {
- // linear thrusters get a secondary glow billboard
- if (linear_only) {
- glowTex->Bind();
- - glow = Clamp(viewdir.Dot(cdir), 0.f, 1.f);
- - color.a = pow(glow, 2.f);
- + glow = Clamp(pow(viewdir.Dot(cdir), len), 0.f, 1.f);
- + color.a = glow;//pow(glow, 2.f);
- thrusterProg->SetUniform("color", color);
- glColor4f(color.r, color.g, color.b, color.a);
- glPushMatrix();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement