Skip to main content
grammar and punctuation; removed blacklisted engine tag
Source Link
Gnemlock
  • 5.3k
  • 5
  • 30
  • 60

implementing How should I implement multi pass-pass rendering in a game engine?

I have done multi pass-pass rendering, before, and understand how it works. I didmade a simple example, which rendered a basic scene with shadows. This was all done inpart of one file. Now, I am trying to figure out is how to put it into my game engine.

Currently, my game engine isuses a single pass. It is in a hierarchical structure, and uses Direct3D9Direct3D 9. I have a graphics component, which will load and draw a 3d3D model. In my game loop, I update all of the entities in the world, then I call the draw function for each one. This This draw function gets the vertex buffer, index buffer and texture/ or material, and draws the 3d3D model using a shader. This isworks fine.

To do multi pass-pass rendering, to allow for shadows say, I will need to draw each model multiple times. It doesn't seem right, to me, that in each models draw function I should put the 2ndsecond pass code ascode; this will then be completed before the next models 1stfirst pass. Does anyone know of any design solutions or places where I can find some more information about this?

I hope this question isn't too confusing, I have tried to explain what I currently have and whatHow should I would like to achieve to the best of my ability.

Regards,

MD.implement multi-pass rendering in a game engine?

implementing multi pass rendering in a game engine

I have done multi pass rendering before and understand how it works. I did a simple example which rendered a basic scene with shadows. This was all done in one file. Now I am trying to figure out is how to put it into my game engine.

Currently my game engine is single pass. It is in a hierarchical structure and uses Direct3D9. I have a graphics component which will load and draw a 3d model. In my game loop I update all the entities in the world then I call the draw function for each one. This draw function gets the vertex buffer, index buffer and texture/ material and draws the 3d model using a shader. This is fine.

To do multi pass rendering to allow for shadows say I will need to draw each model multiple times. It doesn't seem right to me that in each models draw function I should put the 2nd pass code as this will then be completed before the next models 1st pass. Does anyone know of any design solutions or places where I can find some more information about this?

I hope this question isn't too confusing, I have tried to explain what I currently have and what I would like to achieve to the best of my ability.

Regards,

MD.

How should I implement multi-pass rendering in a game engine?

I have done multi-pass rendering, before, and understand how it works. I made a simple example, which rendered a basic scene with shadows. This was all part of one file. Now, I am trying to figure out is how to put it into my game engine.

Currently, my game engine uses a single pass. It is in a hierarchical structure, and uses Direct3D 9. I have a graphics component, which will load and draw a 3D model. In my game loop, I update all of the entities in the world, then I call the draw function for each one. This draw function gets the vertex buffer, index buffer and texture or material, and draws the 3D model using a shader. This works fine.

To do multi-pass rendering, to allow for shadows, I will need to draw each model multiple times. It doesn't seem right, to me, that in each models draw function I should put the second pass code; this will then be completed before the next models first pass.

How should I implement multi-pass rendering in a game engine?

Tweeted twitter.com/#!/StackGameDev/status/96830580724989952
Source Link
MulletDevil
  • 777
  • 7
  • 14

implementing multi pass rendering in a game engine

I have done multi pass rendering before and understand how it works. I did a simple example which rendered a basic scene with shadows. This was all done in one file. Now I am trying to figure out is how to put it into my game engine.

Currently my game engine is single pass. It is in a hierarchical structure and uses Direct3D9. I have a graphics component which will load and draw a 3d model. In my game loop I update all the entities in the world then I call the draw function for each one. This draw function gets the vertex buffer, index buffer and texture/ material and draws the 3d model using a shader. This is fine.

To do multi pass rendering to allow for shadows say I will need to draw each model multiple times. It doesn't seem right to me that in each models draw function I should put the 2nd pass code as this will then be completed before the next models 1st pass. Does anyone know of any design solutions or places where I can find some more information about this?

I hope this question isn't too confusing, I have tried to explain what I currently have and what I would like to achieve to the best of my ability.

Regards,

MD.