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.

Dark GDK / Deffered Lightning - Getting texture information of all object in scene.

Author
Message
Red Eye
16
Years of Service
User Offline
Joined: 15th Oct 2008
Location:
Posted: 9th Nov 2010 14:04 Edited at: 9th Nov 2010 14:09
Hello,

I have been working on a deffered lightning system, basically it just returns a "light value" to cam view relatively to where the light is, the radius of the light and the object(s) distance that is(are) affected by it. But it just calculates it for now, and probably not accurate.

I was wondering how would i go on retrieving the texture an object is holding? Because I got a dbo file, wich holds alot of textures. It loads in automaticaly. How do I know what textures are loaded in?

I know this could be easier done in hlsl coding(not saying it's easy, must be hard), but i am not an pro in shader coding, i was just testing if I could manage to get some deffered calculation working, and get some visual feedback.

For what I am trying, I can retrieve Mamb from scene, + Mspec.

And maybe some other info on this(Deffered Lightning Topic)?

Thanks,

RedEye

_Pauli_
AGK Developer
15
Years of Service
User Offline
Joined: 13th Aug 2009
Location: Germany
Posted: 9th Nov 2010 17:16 Edited at: 9th Nov 2010 17:18
Quote: "how would i go on retrieving the texture an object is holding?"


I think you can use dbLimbTextureName() for this. Either limb by limb, or just use limb 0 for the whole object.

Quote: "I know this could be easier done in hlsl coding"


Do you mean just the texture thing or Defferred Lighting? If you mean Deffered Lighting I would strongly recommend to do it with HLSL shaders, especially since the new DarkGDK 7.5 features the RENDERCOLORTARGET semantic.
But then, since you said your not that good with shaders it might be too hard to achieve decent Deffered Rendering...

I once tried it, but with less shader experience than today and without the new DGDK features, so I didn't have much success...
I remember this GameDev-Article helped a bit. I think Evolved had a working Deffered Rendering running in DBPro too.

Good Luck!

Now the plot thickens, the fps decreases, and the awesomeness goes through the roof.
Red Eye
16
Years of Service
User Offline
Joined: 15th Oct 2008
Location:
Posted: 9th Nov 2010 18:42
@Pauli: REally thanks! Yeah my shaderskills arent very high,, I am planning buying a book on hlsl tho.

Anyway, will look into the new feature. Thanks for the link, i will take a look at it. Yeah Evolved inspired me to take a look at deffered rendering / lightning formules.

Login to post a reply

Server time is: 2024-11-19 16:37:23
Your offset time is: 2024-11-19 16:37:23