i have a random unity scene and i try to implement a color segmentation. Therefore i take every renderer and set a pre defined color via a MaterialPropertyBlock.
Now i have the problem, that unity is blending colors at two meeting edges, as you can see in the image.
Since i just want the predefined colors in my image and not a color gradient between 2 predefined colors im looking for a solution for this problem.
Are there any suggestions?
Btw the RenderTexture im rendering on has
Fortunately i can give the answer now .
I rendered the image in a RenderTexture. This RenderTexture was created from another RenderTexture, that served as template; lets call it renderTextureTemplate.
The filter mode in this renderTextureTemplate was set to point
Now i created another RenderTexture:
RenderTexture copyTexture= new RenderTexture(renderTextureTemplate);
The Unity Documentation says:
public RenderTexture(RenderTexture textureToCopy);
textureToCopy Copy the settings from another RenderTexture.
So i expected, that all the settings are exactly the same. But thats not true, since the filter mode in the copy is set to bilinear by default.
Hope that this will help someone else