Onto the actual Shader discussion!I love the Toolkit. I know pretty much next to nothing about setting up shaders, but I've been able to Frankenstein together some rather nice and workable effects.I managed to cannibalize your flashlight shader and created a flashlight, and a shader that just creates a light halo around the character. LIGHT HALO[quote]shaderActivateLighting(3)bind(shader_effects["light1"].num, "lights[2].position", point(inverty(scrollfix(offset(field("game.CurrentCharacter.Position"),{0,-80}))), 1))bind(shader_effects["light1"].num, "lights[3].position", point(inverty(scrollfix(offset(field("game.CurrentCharacter.Position"),{1000,1000}))), factor(dist(offset(field("game.CurrentCharacter.Position"),{0,2}), cursor), -500)))shaderLamp(2, 1, {100,500,1}, {20,900,10},{0.03,-0.00000001,0.0}, {0,0,0}, {1,1,1}, 1, 90, 1)shaderLamp(3, 1, {1000,500,1}, {0,0,1}, {5.01,0.0,0.000002}, {2,2,2}, {2,2,2}, 5, 90, 1)[/quote]FLASHLIGHT[quote]shaderActivateLighting(2)bind(shader_effects["light1"].num, "lights[0].position", point(inverty(scrollfix(offset(field("game.CurrentCharacter.Position"),{0,-80}))), 1))bind(shader_effects["light1"].num, "lights[0].targetpos", point(inverty(cursor), 20))bind(shader_effects["light1"].num, "lights[1].position", point(inverty(scrollfix(offset(field("game.CurrentCharacter.Position"),{100,100}))), factor(dist(offset(field("game.CurrentCharacter.Position"),{0,10}), cursor), -500)))shaderLamp(0, 0, {900,500,1}, {0,900,10}, {0.001,0.000001,0}, {0,0,0}, {1,1,1}, 1, 90, 0)shaderLamp(1, 1, {1000,50,1}, {0,0,1}, {0.01,0.0,0.000001}, {2,2,2}, {2,2,2}, 5)[/quote]YOUR ORIGINAL FLASHLIGHT SCRIPT[quote]shaderActivateLighting(4)bind(shader_effects["light1"].num, "lights[0].position", point(inverty(scrollfix(offset(field("game.CurrentCharacter.Position"),{0,-200}))), 1))bind(shader_effects["light1"].num, "lights[0].targetpos", point(inverty(cursor), 10))bind(shader_effects["light1"].num, "lights[1].position", point(inverty(scrollfix(offset(field("game.CurrentCharacter.Position"),{0,-200}))), factor(dist(offset(field("game.CurrentCharacter.Position"),{0,-200}), cursor), 10)))shaderLamp(0, 0, {900,500,1}, {0,900,10}, {0.001,0.000001,0}, {0,0,0}, {1,1,1}, 1, 90, 0)shaderLamp(1, 1, {1000,50,1}, {0,0,1}, {0.01,0.0,0.000001}, {1,1,1}, {0,0,0}, 1)shaderLamp(2, 1, {1500,50,1}, {0,0,1}, {0.01,0,0.000001}, {0,0,0}, {0,1,0}, 1)shaderLamp(3, 0, {1300,900,1}, {0,400,10}, {0.001,0.000001,0}, {0,0,0}, fromHSV(1,1,1), 1, 90, 0)[/quote]
by Pyke, 11 years ago