XaiJu
x4fab
x4fab

patreon


Multi-layer rendering for colored glass

Another thing I wanted to get familiar with before working on rain: multi-layer rendering. For colored glass to mask stuff behind it properly, it’s best to render it with multiply blending (turning white to red instead of dimming it and putting red on top), but that would mean regular shading would get messed up. So now there is an option for SHADER_REPLACEMENT to render mesh twice: first time with a different solid color shader with multiplicative blending, and second its usual render pass. It allows to turn this:

Into this:

And this is what different brightness adjustment for main shading pass changes

I think similar approach might help in creating wet materials, puddles and all that. Before that I was thinking about making in it with particles and in post-processing, but that could get pretty expensive, especially in 4K, triple screen or VR. Plus, I think those extra draw calls might give a better result.

Oh, and license plates got their own shader now:

Just parallax guessing height from diffuse map.

Next thing now is to keep fixing bugs, work on proper documentation and then, start working on rain. Hopefully something will work. :)

Multi-layer rendering for colored glass

Comments

That is a great idea! (like always) :)

Josh Kerr

Oh, sure, I’ll work on that! I was also thinking about adding a new thing where car creator could define new events and link car config inputs as parameters, maybe that could help for some new cars as well.

Ilja Jusupov aka x4fab

Ilja, I know you'll be involved with a thousand things, but I've been thinking about a development question for several days. Would it be possible to introduce new effect sounds that replaced the original Kunos? For example: -Wind sound in hood camera -some and different skid sounds on tires (depending on speed and other factors, tarmac, wheels with more temperature or less) -Different impact sounds (car / car, car / wall, etc.) Thank you for your hard work and the incredible possibilities you always bring us

Josh Kerr

Stunning. Waiting for the rain :) I'm testing the third party wet shader but it only works when i disable the shader patch so a built-in rain shader is a very nice addition.

Boost

Thanks, very glad to hear about performance improvements! :)

Ilja Jusupov aka x4fab

I've just been driving v.1.40 for the first time with the new paint shaders and they're just spectacular Ilja. Seem to have got a lot of FPS performance back too. Great stuff. Thank you!

xez

Great stuff. Looking very real and authentic. Looking forward to trying the differences myself. Thank-you very much sir!


More Creators