Horde3D http://www.horde3d.org/forums/ |
|
Lightshaft shader http://www.horde3d.org/forums/viewtopic.php?f=4&t=1535 |
Page 2 of 2 |
Author: | Almahmudrony [ 13.12.2016, 13:17 ] |
Post subject: | Re: Lightshaft shader |
After changing Varying vec3 lPos;, The flashing rate has been decrease.... But the problem not gone... So is there any way to send light position from code into shader... ![]() and one question, Is that the lightPos (what i'm working on,you know doc don't saying about that much only this {uniform vec4 lightPos position of the light source in xyz components and radius in w}) screen space or world space? may be it's world space because of "z" component, but i'm not sure ![]() |
Author: | Almahmudrony [ 13.12.2016, 13:40 ] |
Post subject: | Re: Lightshaft shader |
Thank you so much Irdis.... For your cool information, right now i'm using a simple hack, and that is i set the lightPos as constant.. like this.. Quote: vec4 v = vec4(0,20,50,200); because my light is stand still in that position in world space... i'll use this code until i figure out a way to update light position from my code into shader instantly.... ![]() |
Author: | Irdis [ 13.12.2016, 14:03 ] |
Post subject: | Re: Lightshaft shader |
Almahmudrony wrote: Is that the lightPos (what i'm working on,you know doc don't saying about that much only this {uniform vec4 lightPos position of the light source in xyz components and radius in w}) screen space or world space? may be it's world space because of "z" component, but i'm not sure ![]() It is always in world space. W is radius. |
Page 2 of 2 | All times are UTC + 1 hour |
Powered by phpBB® Forum Software © phpBB Group https://www.phpbb.com/ |