Jump to content

Recommended Posts

Posted

Found old thread and wanted to make Area light and share it for community, but new version is differs from last one

It's already supported. Uncomment line 343 of shaders\lighting\pointlight.frag:

//ambient = gl_LightSource[0].diffuse * (1.0-falloff) * 0.25 * diffuse;

Now, pointlight.frag consists of 122 lines

Working on LeaFAQ :)

Posted

try replacing the last line:

gl_FragData[0] = (lightcolor * diffuse * attenuation * shadowcolor) + (specular * shadowcolor);

with this:

ambient = gl_LightSource[0].diffuse * (1.0-falloff) * 0.25 * diffuse;
gl_FragData[0] = ambient + (lightcolor * diffuse * attenuation * shadowcolor) + (specular * shadowcolor);

Win7 64bit / Intel i7-2600 CPU @ 3.9 GHz / 16 GB DDR3 / NVIDIA GeForce GTX 590

LE / 3DWS / BMX / Hexagon

macklebee's channel

Posted

The problem is that i cant find linking between light and shader.

 

So, i created copy of Leadwerks Engine SDK\Models\Entities\Light\Point\ and called it Leadwerks Engine SDK\Models\Entities\Light\PointArea\

then i renamed all files into light_pointArea

 

now i'm searching for linking with pointlight.frag (i want to create pointlightarea.frag), but total commander says that there is no text "pointlight.frag" in folder Leadwerks Engine SDK\Models\Entities\

Working on LeaFAQ :)

Posted

vec4 ambient = gl_LightSource[0].diffuse * (1.0-falloff) * 0.25 * diffuse;
gl_FragData[0] = ambient + (lightcolor * diffuse * attenuation * shadowcolor) + (specular * shadowcolor);

 

Thats ok.

Working on LeaFAQ :)

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...