- Home /
clipping shader for OpenGL quad
I have a basic shader that lets me bind a texture to a gl quad. I'm trying to implement some "cliping" functionality. I want to achieve the cliping in the Fragment shader. So the first thing i'm trying to do is render everything as one solid color. Here is the shader i have so far http://pastebin.com/2XJrEPhn This render everything as one color, but gives me the following error: Material doesn't have a texture property '_MainTex' Can anyone point me in the right direction as to what i'm doing wrong?
After some research i found this: http://unity3d.com/support/documentation/Components/SL-SurfaceShaderExamples.html Can anyone point me to a much simpler example that simly shows how i can take a texture into the fragment shader and just output the color that is samples?
Your answer
Follow this Question
Related Questions
ES2.0 Diffuse Shader? 0 Answers
Can a CG shader fail to work on hardware? 1 Answer
GLSL shader adding UV offset 1 Answer
Why doesn't this vertex+fragment shader work? 0 Answers
How to use Unity3d shader to mask another two-pass shader? 0 Answers