Horde3D

Next-Generation Graphics Engine
It is currently 19.03.2024, 03:51

All times are UTC + 1 hour




Post new topic Reply to topic  [ 18 posts ]  Go to page Previous  1, 2
Author Message
 Post subject: Re: Lightshaft shader
PostPosted: 13.12.2016, 13:17 
Offline

Joined: 02.12.2016, 12:30
Posts: 23
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 :?: ....

_________________
~@AlmahmudRony@~


Top
 Profile  
Reply with quote  
 Post subject: Re: Lightshaft shader
PostPosted: 13.12.2016, 13:40 
Offline

Joined: 02.12.2016, 12:30
Posts: 23
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....
:wink:

_________________
~@AlmahmudRony@~


Top
 Profile  
Reply with quote  
 Post subject: Re: Lightshaft shader
PostPosted: 13.12.2016, 14:03 
Offline

Joined: 17.11.2009, 17:00
Posts: 205
Location: Russia, Moscow
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.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 18 posts ]  Go to page Previous  1, 2

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group