Is it possible to cut/put a hole through the centre of a shader effect applied to the camera so I can see through?
I purchased the Camera Filter Pack from the asset store while its on sale and I’m using theCameraFilterPack_FX_Hexagon_Black effect and would like to put a hole through it faded at the edges if possible, as I have no clue about writing shaders any help, advice would be appreciated, thanks.
I’m using a post processing effect shader on the camera that requires the Render Texture function of Unity Pro, post processing shaders are different from regular shaders as there is no model to stick the material on.
So cannot use a depth mask , alpha shader or at least I think I cannot, as I said before I’m no shader programmer so was looking for some advice.
Thats why I’d like to know if I could add/code into the shader to see through the centre … or use another post processing shader to mask the centre.
If it’s a full-screen effect then standard blending won’t work: it’s expected to produce 100% of the final output. You’ll need to add a bit to the end of the fragment shader to blend in the original input over the resampled result.
what’s going on in that shader, is that a complex effect is being applied on top of a regular render texture. in the image effect code it will have the raw render texture code, incolor.rgb prior to the distortions and outcolor.rgb after the distortions, at the very beggining and end of the pixel shader/surface shader function… so you can probably go in the code and add 2-3 lines at the end merge the two rgb values, try "if y > 0 use incolor.rgb else use outcolor.rgb
have fun with the pixel shader and go up the signal chain of rgb values going from the end, find the output rgb, and then go up the maths code and see how the rgb values change over time, until you find the original in one at top of code. it should all be inside a single fragment shader with in rgb and out rgb and perhaps functions and maths in the middle.