I'm looking for a creative way to subtract a texture A from a texture B, per pixel, like so:
https://lh3.googleusercontent.com/-z7VjU8Vrl3A/WifOl-oj0mI/AAAAAAAADSU/BjAzVVLD_-kPEh9EA12YdyG0zdEpOjbdACL0BGAYYCw/h302/2017-12-06.png
I've been looking at different post processing materials/shader such as g_colourmodify Shader, which allows subtraction but per-texture rather than per-pixel. Also considering using the $detail material parameter. But they don't seem like the solution I'm looking for.
Would highly appreciate your suggestions!
I just remembered that there's a material called pp/sub (listed here). I've never tried using it so you're gonna have to test it.
Material source:
"Modulate"
{
"$ignorez" "1"
"$writez" "0"
"$basetexture" "_rt_FullFrameFB"
}
Halo library usage source:
mat_Sub:SetTexture( "$basetexture", rt_Blur )
render.SetMaterial( mat_Sub )
for i = 0, entry.DrawPasses do
render.DrawScreenQuad()
end
Seems like rather than subtracting its $basetexture, mat_sub subtracts a some constant number from all the edited pixels.
Sorry, you need to Log In to post a reply to this thread.