As i tried/struggle to find solutions with rays , materials and changing alpha channel of objects, i was wondering if applying a 2d filter wouldnt make things easier and more elegant
I have no knowledges in glsl so i was wondering if someone can help me program a 2d filter in which , below an X distance of the focal point of the camera (X would be the distance camera - character) , the more a vertex is close to the camera, the more it will be transparent … kinda “reverse fog”
Its a misunderstood of me ; 2d filters are only a process on a rendered image , so its impossible to “scratch” the pixel to see what’s hidden behind in order to blend both … so transparency - blending front pixels with “back” pixels is not an option.
@Daedalus_MDW kindly helped the newbie i am with materials and gave me a conveniant solution. Thx to him
@ANSH, it was not about dynalicaly setting a color to an object, (i use this to underline a target selection for example) but more acting on a “pixel level” .
i used clip here to get a clear hole, normally you would use alpha blend to get soft edges and see thru, and the other reason i used a color ramp where laziness, it is a fast way to clip the result in the 0 to 1 space.