By using this site, you agree to our Privacy Policy and our Terms of Use. Close
megafenix said:

with multipasses you can achieve more things sure, but i am not suggesting to always use single pass but to try to use as less passes as possible to strain the hardwrae as low as possible, thats the kind of approach defered rendering tries to achieve vs the forward rendering, defered rendering strains less the shaders and the pipeline and can render more lights with less resources(except for memory bandwidth needs) than forwrd rendering would need to render those same lights, sure is not perfect and trades off bandwidth so that you dont use to much shader power, but hey since wii u has plenty of memory bandwidth and is low on shader power this approach is ideal

thats why i brought the topic of single pass vs multipass,of course that its almost impossible to achieve something in single pass than in multipass, but thats not the point, the point is that is better to look for a solution that uses as less passes as possible to achieve a work that could have taken more passes with other approach


Actually that is not always true in fact using multiple passes will often be faster, and easier to implement. Complex shaders have a significant performance impact even on the latest GPUs. For many cases using multiple simple shader passes will end up being cheaper than trying to do everything in a single pass. Especially in modern game engines where you can mix a lot of different textures and effects on a single model, and lots of different models in the same scene. Often it will be cheaper to do each in a seperate pass so that you can use simple shaders that have less setup time and you don't waste performance calling assets and effects for areas that don't need them.

For example if you are rendering a human character with SSS on their skin, and completly different shading for their cloths. It will probably be faster to do a seperate pass for each. Rather than do it all in a single pass where you are calling a super complex shader that does both types of shading. The more things you try and do in a single pass the more redundant processing you will need to do. Especially if you have multiple types of meterials and effects in defferent parts of the scene, as that would require branching where the shader has to work out wich effects it has to do for each pixel as branches are very expensive on GPUs.

Another example would be transparent objects in a deferred renderer. Normally deferred rendering does not support transparent or translucent objects. The methods for rendering transparencies in a deferred renderer a super expensive and usually involve multiplying the size of the G Buffer. So the way most devs get around this is to just render transparent objects in a completly seperate forward shader pass.



@TheVoxelman on twitter

Check out my hype threads: Cyberpunk, and The Witcher 3!