About Store Forum Documentation Contact
Donations:
140$/mo



Post Reply 
hi,friend help! about Flt (*shadow_step)(Int i,Int num)
Author Message
lovee Offline
Member

Post: #1
hi,friend help! about Flt (*shadow_step)(Int i,Int num)
hi!

I saw " -new member D.shadow_step allowing to manually select the fraction of the shadow map splits "

and find this Features in Display.h "Flt (*shadow_step)(Int i,Int num); "

for example,
1.
//***************************
Int i=1, num=2048;
D.shadow_step(Int i,Int num);
//***************************

2.
//***************************
Int i=1,num=2048;
D->shadow_step(Int i,Int num);
//****************************

3.
//***************************
Flt my_shadow_step_fun (Int & i,Int & num)
{
Int shadow_step_i=1;
Int shadow_step_num=2048;
i=shadow_step_i;
num=shadow_step_num;
}
Flt(*shadow_step)(Int i,Int num);
shadow_step=my_shadow_step_fun;
D.shadow_step;
//**************************

but Compile Error.
how can i use it?
please give a little tips!
thank you very much!
01-14-2010 04:56 PM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #2
RE: hi,friend help! about Flt (*shadow_step)(Int i,Int num)
Code:
Flt ShadowStep(Int i,Int num)
{
   return Flt(i)/num;
}

InitPre()
{
   D.shadow_step=ShadowStep

but you should change the function "i/num" for a custom one
01-14-2010 05:00 PM
Find all posts by this user Quote this message in a reply
lovee Offline
Member

Post: #3
RE: hi,friend help! about Flt (*shadow_step)(Int i,Int num)
thank you!
01-15-2010 11:32 AM
Find all posts by this user Quote this message in a reply
Post Reply