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 / Additional Lightmap Stage for Defered Shading

Author
Message
Red Eye
15
Years of Service
User Offline
Joined: 15th Oct 2008
Location:
Posted: 15th Nov 2012 14:41 Edited at: 15th Nov 2012 15:03
Hey there fellow game developers,

So I got Deferred Shading to work with .DBO level files. But got one problem. I tried to add a Lightmap stage to the original .fx file ( which is attached to this post ) but failed.

So here is how I did it:

First I added this:

Code:



Next I went to the float4 PS function , and added here a new parameter, Tex1:texcoord1 .

I used this parameter in the same function. Here is the full edited float4 PS function:

Code:




After done and saved, I textured my object limb with a lightmap texture on Stage 5, like this:

Code:




The deferred shading kept working , altough the brithness of the entire object seemed to be very high, and no lightmap whatsoever was applied.

Is there something I am doing wrong in the HLSL shader?

Cheers,

Leo

EDIT: I figured texcoord1 (in the parameter of the PS function should be texcoord5 as the 5th stage is being used. But does not work.

Attachments

Login to view attachments

Login to post a reply

Server time is: 2024-03-29 07:25:51
Your offset time is: 2024-03-29 07:25:51