I guess I got fog working.. grin carried it out into PixelShader. Testing now.
[Linked Image]

The only thing left is spotlight calculations. Got to think how to make it work..

Edit:

I also found this on github
Code
//Vertex snapping
float4 snapToPixel = mul(UNITY_MATRIX_MVP,v.vertex);
float4 vertex = snapToPixel;
vertex.xyz = snapToPixel.xyz / snapToPixel.w;
vertex.x = floor(160 * vertex.x) / 160;
vertex.y = floor(120 * vertex.y) / 120;
vertex.xyz *= snapToPixel.w;
o.pos = vertex;
Would be awesome if I could get it to work too !

Edit2: damn.. I didn't think that it would be so easy to implement vertex snapping... man I love results I'm getting !

Edit3: added shader cut off on distance!

Last edited by 3run; 02/27/20 10:52.

Looking for free stuff?? Take a look here: http://badcom.at.ua
Support me on: https://boosty.to/3rung