Download

Forward shading can be implemented in UE4?

I was just wondering if forward shading can be implemented in UE4 or we have no option only to use deferred shading?
If yes forward shading can be implemented then how?Do I need to edit the source code(If it is source code where is that?) or there is some other way to make that happen?

Hi Inder,

There are plans to implement some forward rendering for material use only that I’m aware of, but not as a replacement for deferred rendering or to give the user the option to switch between the two. Martin Mittring has mentioned this on one of the twitch live streams before that he is working on some material things that could have forward rendering enabled to get better results with translucency and water shader type materials. Currently this is a side project for him, so there is no specified timeline for when this would make it out to the public.

Tim

Thanks for a reply!
Let’s say if I want to change the functionality or I want implement some custom behavior into Deferred Shading,where can I do that?

Is this sort of a thing even possible?

An hybrid forward renderer (like forward+ with tiled/indexed/clustered lighting) would be great!

I would also like more options, but I think implementing a complete forward rendering pass would be quite problematic for things like reflection or gpu lights. However I really would like the ability to implement a custom shader to replace the inbuilt deferred composition. That way it might be easier to implement custom passes or toon shading.

I found a quite interesting work - https://forums.unrealengine.com/showthread.php?27766-Odessey-Creating-my-own-G-Buffer-in-UE4

Isn’t the mobile render path a forward-renderer? You could use it as a base.

Yes pedro, the mobile preview & mobile paths use the forward shading renderer.

No-one today uses a pure forward rendering algorithm, nor a pure deferred rendering algorithm. Hybrid forward algorithms are good as hybrid deferred algorithms, it’s more a choice between material/bandwith/antialiasing-friendly (forward) and very_dense_light_enviornment-friendly (deferred). You can find some hybrid algorithms (forward+, forward+ and deferred with tiled lightning) here http://developer.amd.com/tools-and-sdks/graphics-development/amd-radeon-sdk/ and I am also sure there are a lot of talks and slides by NVIDIA (or tested with NV hardware) around the web about hybrid rendering algorithms (I have a couple of PowerPoints onto my disks… somewhere…).