Sign in to follow this  
the incredible smoker

Engine Lighting

Recommended Posts

A little more information about the architecture of your engine / game project would be great. But either way, if you are seeking a method for rendering a large quantity of lights, I would start by looking into Deferred Rendering (Again, knowing what you have would help). In case your project is already following the path of a Deferred Renderer (Or forward) and you would like "more" lights with less cost, I would look into Tiled / Clustered Deferred Shading (Also applies for forward rendering)

 

Good luck!

Share this post


Link to post
Share on other sites

Hi, i,m using DX9.0.

There are 8 lights for usage.

 

What is modern style ?, are there no 8 lights in DX11 by example ?

Or should i use those 8 lights with different settings for each thing rendered ?

 

Its nice to know what to look into Migi,

it would be better for me to tell how it is roughly done,

if i understand the ideas that are available, i can try.

 

thanks

Share this post


Link to post
Share on other sites

When you use shaders you program the light yourself. So you can store light information into buffers/textures for example which can then be retrieve in the vertex/pixelshader to process more than 8 lights. But if you are using the fixed pipeline you cannot use more than 8 lights. If you want to use more than 8 lights you will have to render the scene more than once with additive blending.

Edited by BornToCode

Share this post


Link to post
Share on other sites

Hi, thanks for the reply`s.

I dont know anything about shaders, i used vertexbuffer for the map so far.

I would like to have by example all cars 4 lights, and a lot of cars + scene lighting from lanterns all together.

 

Rebuilding vertexbuffer every frame cost to much, so i have to take a look what shader exacly is compared to vertexbuffer.

Share this post


Link to post
Share on other sites

Shaders and vertex buffers are different things, and likely you'll still be using a vertex buffer for data, even when using shaders for rendering.

 

Vertex buffers just store the vertex data, note that if you are rebuilding it every frame then you may want to look into better methods.  For a typical model (a car model, for instance), the car itself doesn't change every frame, only a single matrix that transforms the car model into world space.  You would only have to update a single matrix to move the car, instead of rebuilding the entire vertex buffer.

 

Shaders are how everything gets handled, vertex shaders transform input data into screen space, fragment shaders determine the color of every pixel, etc.  In a fixed function pipeline, the transformation was, as the name implies, fixed.  You can modify the parameters, but the equation will always stay the same.  With shaders, you write the entire process yourself.

 

Buffers supply the data, while shaders modify the data.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this