Search Feedback

71
votes

Allow forward shaders to output into gbuffer in an additional pass

Graphics

-

-

Unity allows us to use forward-only shaders on top of the deferred renderer, which is nice. The problem is that many image effects rely on normals information in the gbuffer, which is missing. This results in rendering artifacts ranging from small inconsistencies (missing reflection and wrong glossiness in SSR) to plain unbearable (occlusion of background objects in SSAO/HBAO).
In forward mode the depth-normals texture is rendered so it works as intended, while in deferred mode forward opaque objects are simply skipped.
I think objects with forward-only shaders should either get rendered into gbuffer with replaced shaders, like in forward mode or better, we should be able to write hybrid deferred/forward shaders by specifying both deferred and forward passes (similar to the meta pass).
The first solution provides fix for current shaders unmodified. The latter requires intervention from shader author, but adds more flexibility combining some advantages of deferred and forward shading. My skin shader would benefit greatly from this approach.

Your opinion counts

Help us make things better. Share your great idea for improving Unity or vote for other people’s.

Log in to post a new idea

Categories

All

(10883)

2D

(287)

Ads

(57)

AI & Navigation

(81)

Analytics

(130)

Animation

(406)

Asset Store

(363)

Asset Store Publisher

(19)

Assets

(551)

Audio

(185)

Cloud Build

(146)

Collaborate

(67)

Docs & Tutorials

(246)

Editor

(2545)

Everyplay

(17)

Game Performance Reporting

(21)

General

(987)

Graphics

(894)

GUI

(442)

Input

(173)

Licensing

(93)

Networking

(189)

Physics

(387)

Platforms

(445)

Profiling & Optimization

(84)

Runtime

(185)

Scripting

(1141)

Terrain

(174)

WebGL

(142)