Does anyone have docu for the dynamic lighting gadget?
Moderator: Moderators
- Silentwings
- Posts: 3720
- Joined: 25 Oct 2008, 00:23
Re: Does anyone have docu for the dynamic lighting gadget?
Code: Select all
void DecayColors() {
const bool expAmbientDecay = (decayFunctionType.x != 0.0f);
const bool expDiffuseDecay = (decayFunctionType.y != 0.0f);
const bool expSpecularDecay = (decayFunctionType.z != 0.0f);
if (expAmbientDecay) {
ambientColor *= ambientDecayRate;
} else {
ambientColor -= ambientDecayRate;
}
if (expDiffuseDecay) {
diffuseColor *= diffuseDecayRate;
} else {
diffuseColor -= diffuseDecayRate;
}
if (expSpecularDecay) {
specularColor *= specularDecayRate;
} else {
specularColor -= specularDecayRate;
}
}
Re: Does anyone have docu for the dynamic lighting gadget?
I just want to ask again. Maybe spring devs can help:
Is it possible to implement dynamic lightening for lasers?
Is it possible to implement dynamic lightening for lasers?
Re: Does anyone have docu for the dynamic lighting gadget?
bolt-style lasers: yes, easily
beam-style lasers: nope
for the rest: http://springrts.com/wiki/Lua_UnsyncedCtrl#Rendering
beam-style lasers: nope
for the rest: http://springrts.com/wiki/Lua_UnsyncedCtrl#Rendering
- Silentwings
- Posts: 3720
- Joined: 25 Oct 2008, 00:23