Skip to content
Snippets Groups Projects
Commit 898251a7 authored by DarkGod's avatar DarkGod
Browse files

and fix to use shininess

parent e43a6af1
No related branches found
No related tags found
No related merge requests found
......@@ -21,7 +21,11 @@ base_size = 64
local shader = shader or false
if shader then use_shader = {type="volumetric_aura"} end
if core.shader.active(4) then
if shader then use_shader = {type="volumetric_aura"} end
else
shader = false
end
local speed = speed or 0.023
local a = (a or 60) / 255
......@@ -37,7 +41,7 @@ if grow then grow = basesize / limit_life end
local nb = empty_start and -1 or 0
return {
blend_mode = shader and core.particles.BLEND_ADDITIVE or nil,
blend_mode = shader and core.particles.BLEND_SHINY or nil,
system_rotation = base_rot or rng.range(0, 360), system_rotationv = speed,
generator = function()
if nb == -1 then
......
......@@ -19,7 +19,7 @@
base_size = 32
return { blend_mode=core.particles.BLEND_ADDITIVE, generator = function()
return { blend_mode=core.particles.BLEND_SHINY, generator = function()
local ad = rng.range(0, 360)
local a = math.rad(ad)
local dir = math.rad(ad + 90)
......
......@@ -19,7 +19,7 @@
base_size = 32
return { blend_mode=core.particles.BLEND_ADDITIVE, generator = function()
return { blend_mode=core.particles.BLEND_SHINY, generator = function()
local ad = rng.range(20+90, 160+90)
local a = math.rad(ad)
local dir = math.rad(ad + 90)
......
......@@ -21,7 +21,7 @@ base_size = 64
local nb = 0
return { blend_mode=core.particles.BLEND_ADDITIVE, generator = function()
return { blend_mode=core.particles.BLEND_SHINY, generator = function()
local ad = rng.range(0, 360)
local a = math.rad(ad)
local dir = math.rad(ad)
......
......@@ -67,7 +67,7 @@ end
local nbp = #points
-- Populate the lightning based on the forks
return { blend_mode=core.particles.BLEND_ADDITIVE, engine=core.particles.ENGINE_LINES, generator = function()
return { blend_mode=core.particles.BLEND_SHINY, engine=core.particles.ENGINE_LINES, generator = function()
local p = table.remove(points, 1)
return {
......
......@@ -22,7 +22,7 @@ base_size = 32
local nb = 0
return {
blend_mode=additive and core.particles.BLEND_ADDITIVE or nil,
blend_mode=additive and core.particles.BLEND_SHINY or nil,
system_rotation = 0, system_rotationv = rotation or 0.3,
generator = function()
local fs = 38 * (radius or 1)
......
......@@ -24,7 +24,7 @@ local g = 1
local b = 1
local a = a or 1
return { blend_mode = blend and core.particles.BLEND_ADDITIVE or nil, generator = function()
return { blend_mode = blend and core.particles.BLEND_SHINY or nil, generator = function()
return {
trail = 0,
life = 10,
......
......@@ -54,7 +54,7 @@ local nbp = #points
-- Populate the lightning based on the forks
return {
blend_mode=additive and core.particles.BLEND_ADDITIVE or nil,
blend_mode=additive and core.particles.BLEND_SHINY or nil,
engine=core.particles.ENGINE_LINES,
generator = function()
local p = table.remove(points, 1)
......
......@@ -46,6 +46,7 @@ void main(void)
}
float shininessOpacity = 0.0;
gl_FragColor = vec4(emittedColor.rgb, 1.0 - absorb + (emittedColor.r + emittedColor.g + emittedColor.b) * shininessOpacity);
gl_FragColor.a *= gl_Color.a;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment