Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Professional Discussion / Lightmap+Object Filter?

Author
Message
B++
16
Years of Service
User Offline
Joined: 6th Dec 2009
Location: India
Posted: 7th Apr 2011 21:26
Hi,
Does anyone know how to apply object filtering with the Lightmap.fx file?

Thanks in advance
Regards

Lightmap.fx



Your Signature Here;
baxslash
Valued Member
Bronze Codemaster
19
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 7th Apr 2011 23:46
Is this Evolved's shader?

Looks like it.

Not sure quite what you mean by 'object filtering'? Are you trying to get the shader to work or do something else to an object that already uses the effect?

B++
16
Years of Service
User Offline
Joined: 6th Dec 2009
Location: India
Posted: 8th Apr 2011 16:08
Hi,
sorry for unclear post. Actually i have a map with the lightmap shader applied on it. The default filtering of dbp is linear. I want to change it to point. But it is not working with the lightmap shader.
yes it is evolved lightmap shader.

thanks
regards


Your Signature Here;
baxslash
Valued Member
Bronze Codemaster
19
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 8th Apr 2011 16:25
OK, sorry I don't know how to do that. Beyond my knowledge I'm afraid!

I would be interested in knowing what it is used for? Is it something you can set in the FX file? If so then Green Gandalf might know. As well as being a fan of Wembley Fraggle he's gosh darned tootin' smart when it comes to shaders...

B++
16
Years of Service
User Offline
Joined: 6th Dec 2009
Location: India
Posted: 8th Apr 2011 16:56
Hi,
I also think it is related to fx file. Since DBP's command is not working. Not sure though. Shader is out of my understanding.

Thanks
Regards


Your Signature Here;
Green Gandalf
VIP Member
21
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 8th Apr 2011 23:03
Quote: "The default filtering of dbp is linear. I want to change it to point. But it is not working with the lightmap shader.
yes it is evolved lightmap shader. "


For which texture? The base texture, the lightmap, or both?

In each case you will need to check this bit of the shader:



I don't know which is meant to be the lightmap but that snippet declares three textures: the first and the third, i.e. BaseTX and ColoTX rely on the default filtering mode in their samplers whereas the second, i.e. BlendTX, has some of the filtering turned off. I guess you might want to turn off filtering (and mipmapping) for the lightmap because adjacent pixels in the lightmap might have nothing to do with each other in terms of the model so filtering, i.e. averaging, their values wouldn't make sense.

I suggest you add the filtering modes to the samplers for the first and third samplers and see which modes give the results you want.

The settings in the shader will override those set in DBPro.
B++
16
Years of Service
User Offline
Joined: 6th Dec 2009
Location: India
Posted: 9th Apr 2011 01:50
Hi Green,
Thanks for your reply. Following your advice, I just made it look like what I was looking for. It looks a little weird but at least not like before.

Thanks
Regards


Your Signature Here;

Login to post a reply

Server time is: 2026-07-17 13:59:41
Your offset time is: 2026-07-17 13:59:41