Page 1 of 1

Does anyone have docu for the dynamic lighting gadget?

Posted: 01 Dec 2012, 18:45
by Silentwings
See topic.

Re: Does anyone have docu for the dynamic lighting gadget?

Posted: 01 Dec 2012, 19:11
by Beherith

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?

Posted: 01 Dec 2012, 20:52
by jamerlan
I just want to ask again. Maybe spring devs can help:

Is it possible to implement dynamic lightening for lasers?

Re: Does anyone have docu for the dynamic lighting gadget?

Posted: 02 Dec 2012, 00:02
by Kloot
bolt-style lasers: yes, easily
beam-style lasers: nope

for the rest: http://springrts.com/wiki/Lua_UnsyncedCtrl#Rendering

Re: Does anyone have docu for the dynamic lighting gadget?

Posted: 02 Dec 2012, 00:40
by Silentwings
thanks!