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.

Author
Message
Hawkblood
16
Years of Service
User Offline
Joined: 5th Dec 2009
Location:
Posted: 12th Mar 2010 17:27
Well, turning off vsync may give you better frame rate, but you might start seeing a ripple effect.

@NightX
What is "Deferred_SetUp(1024,768,512,8)"? I don't see it in the code. What example are you refering to?

The fastest code is the code never written.
Madscientist
16
Years of Service
User Offline
Joined: 23rd Aug 2009
Location: Between a rock and a hard place
Posted: 12th Mar 2010 20:41
Yea what is it since it seems like it will speed up my game.

If it hasn't exploded yet, I haven't touched it.
NightX
17
Years of Service
User Offline
Joined: 3rd Apr 2009
Location: Australia, QueensLand
Posted: 13th Mar 2010 03:00 Edited at: 13th Mar 2010 03:11
@Hawkblood & @Madscientist

Well i downloaded Evolved Deferred shaders. it has alot of functions in a big .dba file, that lets you make a light, set it up, make water and tones more. e.g. so you dont have to actually call the dll to change a light colour, u just use the function e.g. deferred_changeLightColor(LightID,Colour) (thats not the correct function name, as i havnt checked it.)


EDIT:

Ok here is a small example I pulled out of my code.




and in the loop -



Madscientist
16
Years of Service
User Offline
Joined: 23rd Aug 2009
Location: Between a rock and a hard place
Posted: 14th Mar 2010 22:29
Okay now I have another problem with evolves multipass light shader. The function LightColor( Light R , G , B , Range ) sets the color and range of the light. When the player backs away from the light and the camera distance from the light is greater than the range, the light shuts off. But when I increase the range, I get a bigger light and the lighting radius increases. How do I stop the light from shutting off when I get far enough away and am still looking at it without increasing the range? I want the light to shut off however if it is not in view.
This is the function (Written be evolved) that turns the lights on and off.


If it hasn't exploded yet, I haven't touched it.
Hawkblood
16
Years of Service
User Offline
Joined: 5th Dec 2009
Location:
Posted: 18th Mar 2010 17:36
I don't use most of those functions. I manually set the lights that are currently in view (and are on). I find it more to my taste to decide which lights to show. That function uses a "size" of the object the light is "acting" on to determine if it's "on it" or not. Make your own function for that. It automatically does it in the .fx as far as distance is concerned. You just have to be concerned with how many lights are associated with the "scene" being rendered with the .fx instance.... All objects that have that instance of the .fx will be checked with the lights listed when you do:

I modified this function for my purposes so it won't look the same for the original download.
You can use the built-in functions in the file or make your own, but the end result is that you pass the light info (and the number of lights) to the .fx so it processes all the objects using that lighting scheme.
The problem of it "shutting off" is probably associated with the "size" factor of your object..... If you don't use the GetObjectLight( O , L ) function and you set it manually, then you shouldn't have that problem.

Hope that helps.

The fastest code is the code never written.

Login to post a reply

Server time is: 2026-07-26 21:12:21
Your offset time is: 2026-07-26 21:12:21