- Home /
Image Effect Shader Vertex Data Format
I am trying to use an ImageEffectShader which is applied to the Camera Render Texture via Blit to draw an object into the scene. I am using SRP so I have to rely on the method in this video to apply the Shader to the Camera Texture.
In my vertex shader I am now trying to get the clip space position of a given vertex. To do this, I understand that you have to multiply the vertex data by a projection matrix, but I can't figure out what format the data is originally in and what I am supposed to multiply it with. Especially since this is an ImageEffectShader that gets applied to a texture on a Camera.
When I do this:
v2f vert (appdata v)
{
v2f o;
o.pos = UnityObjectToClipPos(v.pos);
o.uv = v.uv;
return o;
}
since this is applied to a texture as opposed to an actual object, the v.pos data is not what I expect it to be.
How can I get the actual clip space position of an object based on the data unity provides to an image effect shader?
Your answer
Follow this Question
Related Questions
Stereoscopic postscreen effect UV differences (multi pass) 0 Answers
Shaders: How do I make camera view transparent? (Image effect) 1 Answer
How to apply image effect on a specific area of the screen 2 Answers
How would you go about making a retro pixel image shader? 0 Answers
How to get pixel coordinates in an image effect shader 2 Answers