- Home /
GrabPass and Transparent geometry
I'm attempting to implement a distortion shader using GrabPass, but am currently using the "Complex Invisible" example shader given on Unity's documentation. Here's the code, for reference:
Shader "ComplexInvisible" {
SubShader {
// Draw ourselves after all opaque geometry
Tags { "Queue" = "Transparent+10" }
// Grab the screen behind the object into _GrabTexture, using default values
GrabPass { }
// Render the object with the texture generated above.
Pass {
SetTexture [_GrabTexture] { combine texture }
}
}
}
I am using 2d Toolkit to render my sprites. These shaders render in the transparent queue. For some reason, my GrabPass shader is rendering completely blank. If I switch the shader on my sprites to "Diffuse" instead of the Tk2D shader, then the grabpass works. Unity's Transparent/Diffuse doesn't work, though.
How can I get GrabPass to render transparent objects? I've tried changing the RenderQueue--it seems ineffective.
Your answer
Follow this Question
Related Questions
Receiving Shadows On a Tranparent Shader 1 Answer
Rendering transparent objects back to back (HDRP Lit shader) 0 Answers
ex2D shader fix 1 Answer
Transparency cutting opaque mesh 0 Answers
Two camera rendering for selective glow 0 Answers