The online racing simulator
low reflection shaders
Quote from Aler1 :


low kinda no reflection shaders

How to get those colorless windows? Can't find them anywhere..
Was tinkering around with shaders and made something.
No SweetFX, ReShade or Post Processing filter so the shaders are very lightweight.
Attached images
lfs_00000094.png
lfs_00000093.png
lfs_00000092.png
lfs_00000091.png
lfs_00000090.png
Attached files
shaders.rar - 18.2 KB - 511 views
tutorial? I don't know how to get them to work, I already have reshade and I know how to access it ingame
Hello, here is my custom Live for Speed cartoon post-processing shader. It is very simple because I am a complete newbie in HLSL language. For best results, edit line 18 to match your preferred resolution:
float2 resolution = float2(2560.0, 1600.0);

Not suitable for VR.

Attached images
LFS_toon_shder.jpg
Attached files
LFS_cartoon_shader.zip - 893 B - 60 views
Quote from stuchlo :Hello, here is my custom Live for Speed cartoon post-processing shader. It is...

I built a bit upon that cartoon shader
I found the contour convolution giving too much noise as usual when things move, so I found a way to add a 3x3 blur pass before the cartoon processing, so the rendering feels a bit smoother
I also boosted color saturation a bit
this is still very dirty code, dont laugh too much, I know almost nothing in glsl and this langage has so much constraints.

Still, this could be refined by adding a larger precomputed matrix to allow larger blur
also another blur pass might be good to smooth things out a bit more.

edit :



Attached images
toonshade1.jpg
toonshade2.jpg
toonshade3.jpg
Attached files
PostProcess.zip - 1.2 KB - 29 views
Quote from turbofan :I built a bit upon that cartoon shader...

Thanks, looks better Smile I experimented with Gaussian kernel too, but tried 5x5 kernels and run out of instruction limit, so I left it Big grin There is only one thing, there are some "division by zero" warnings, during shader compilation.

Edit: looks like noise can be reduced using in-game texture filtering settings too
well, after some rest, I am not rly sure my thing actually does anything good
those zero divide errors maybe just make the shader bypass the blur and any better feeling is achieved with texture filtering settings

A different approach with post processed textures (.dds) and a contour filter would give better results

I dont rly like cartoon rendering, it reminds me old bad experiences at work as I have been working on some TV cartoon serie made in 3D with cartoon post processes, and that was a predicted total fail.
But I have a passion for post processing since forever, and noise as the primordial soup from wich harmony emerges.

I may have another try at it. sorry for the noise.
I see cartoon shading when i close my eyes so I had another go.
I could implement a 5x5 blur matrix and remove those zero division warnings
All works good now, but i had to remove gamma correction to avoid instructions limit

Now the best result are achieved with help from texture filtering options
be sure to set options - graphics - texture filtering to max and the 4 Mip bias settings below to zero 0.0.
This give the smoothest render



edit: made it a bit more light, updated screenshot
Attached images
toonshade6.jpg
Attached files
CartoonstuchloBlurtest6.zip - 1.4 KB - 27 views
Quote from turbofan :I see cartoon shading when i close my eyes so I had another go.
I could implement a 5x5 blur matrix and remove those zero division warnings
All works good now, but i had to remove gamma correction to avoid instructions limit

Now the best result are achieved with help from texture filtering options
be sure to set options - graphics - texture filtering to max and the 4 Mip bias settings below to zero 0.0.
This give the smoothest render

edit: made it a bit more light, updated screenshot

Thanks for this! How do I go about installing it?
it's mostly stuchlo's work, thanks to him
extract and save file in data/shaders
copy/rename as PostProcess.psh

setup option->misc->post processing shader [yes]
and the texture filtering as described above

edit:
some more screenshots here
https://www.lfs.net/forum/post/2111746#post2111746
Quote from turbofan :I see cartoon shading when i close my eyes so I had another go...

Good job, looks awesome Thumbs up I must admit, I hoped that somebody will upgrade the shader, when I uploaded it. Nod I will try to get better in HLSL and would like to experiment with different stylized shaders in the future.
am still far to understand all the mechanics of hlsl and the render pipe.
but I pushed things a bit more and integrated a 5x5 blur in the world2 shader before the edge detection to make things a bit smoother.
For now it will affect simple surface with no reflection. Other surface may look a bit too much edged.

2 files have changed, World2.psh and PostProcess.psh
as usual, backup ur shader folder, and replace the to shaders by those in the archive, renaming them accordingly

check options->graphics
texture filtering / AF to 4x
all 4 Mip biases below to 0.0

Adding more detail will make far things more outlined and things will become unreadable and noisy. Try and find ur preference.

Next idea is to change detail as object get farther, something with a z buffer, when I can figure it out how to do that in hlsl plumbing, and an antialiasing pass or whatever to remove last bits of noise and flicker.
No sure I go this far however, mojo might burnout.




Attached images
toonshade20.jpg
toonshade19.jpg
toonshade18.jpg
Attached files
CartoonstuchloBlurtest8- shaders.zip - 3.6 KB - 20 views
Quote from turbofan :am still far to understand all the mechanics of hlsl and the render pipe...

I used a post-processing shader only, to keep it lightweight and because it can be turned off in-game. Of course, it has just a rough color-based approximation of contours. On the other hand, if you are not "afraid" to modify other shaders, IMHO there might be a better-looking solution using Sobel kernels over a depth-map to compute "real" depth-based contours. In that case, pixel shaders (before post-processing shader) must be modified to expose per-texel depth information. I am not sure what LFS does with the alpha-channel. If it is not necessary for some LFS algorithms, depth can be stored directly as a result alpha and the post-processing shader can apply Sobel kernels convolution on it (no gaussian smoothing is needed in this case).

However, if the alpha channel is used (I am not sure, when I visualized the channel, there is some data already), things are getting much more difficult. In such case RGBAD (D for depth) data must be compressed into RGBA (compression should be ok, toon shading uses color quantization anyway) and then decompressed back in the post-processing shader. For example RGBAD -> HSDA (hue, saturation, depth, alpha).
Hello, here is another artistic stylized shader for LFS, this time inspired by historic etching technique. For best results, edit line 18 to match your preferred resolution:
float2 resolution = float2(2560.0, 1600.0);

Definitely not suitable for VR Rofl

Attached files
LFS_etching_shader.zip - 977 B - 21 views

The custom shaders thread
(194 posts, started )
FGED GREDG RDFGDR GSFDG