![]() It supports height and radial options and matches everything perfectly without needing an extra pass, so I'm pretty happy with it. It's basically just a new shader for the stock GlobalFog image effect. The other features should go up more quickly, the fog thing just took forever to find a good solution. To hydroform aluminium into a vehicles frame rail, a hollow tube of aluminium is placed inside a negative mold that has the shape of the desired result. ![]() I didn't get to some features, because I ran out of time and I wanted to make sure that the GlobalFog deferred solution was available ASAP. Hydroforming is a specialized type of die forming that uses a high pressure hydraulic fluid to press room temperature working material into a die. I submitted a new update yesterday, changelist below. I simply added a "Fog Override" with a distance and falloff setting so the user can manually adjust it. The final solution is disappointing, but works well enough and is faster than the multi-pass one. I tried several CameraEvents to hook into, but it was always glitchy. You would need to be an experienced graphics programmer to take advantage of it, so Im not sure there is a market there for asset developers. Now, I could just use the depth buffer I use to determine the shorelines, but the CommandBuffer screen grab was just too glitchy to even try that. This occurs because again, the ShadowCaster pass comes first, writes to the depth buffer and now when it's read back I don't get the terrain depth, I instead get the surface depth, so it thinks all the water is at depth 0. This worked-ish (the screen appeared to be a frame late, darker, and periodically flashed), but then the problem was that the 'fog' applied to refracted water as it gets deeper was not there. Then I tried using CommandBuffers instead of GrabPass so I could grab the screen before ShadowCaster. I even tried separating the ShadowCaster pass into a different material, duplicated the water geometry and assigned the regular color material/shader to one set of geometry with an earlier RenderQueue, and the ShadowCaster material to other geometry with a later RenderQueue, and THAT didn't even work. I also tried to get the regular color pass to occur before the ShadowCaster pass, and this appears to be impossible as well. I tried a bunch of things to try and get GrabPass to come before the ShadowCaster pass without luck. ![]() The ShadowCaster pass also writes to the color buffer, and so when GrabPass is called to fetch the screen texture, a white mess is returned rather than something that can be used for refraction. Unfortunately unlike forward rendering, Deferred doesn't simultaneously write to the GBuffer and the depth buffer in the same pass. In order for Global Fog to work in deferred, there must be a ShadowCaster pass in a shader (this writes to depth buffer). Click to expand.I've been wrestling with deferred mode for about a week now and have exhausted every path I saw to simultaneously have a refraction texture and write to the depth texture for proper fogging via Global Fog.
0 Comments
Leave a Reply. |