- Home /
Pixel shader
Hello,
I have a problem. I have to create pixel shader in UNITY. But I can't find any information about implementation pixel shader to scene.
For example vertex shader I added to material, and pixel shader to what? To camera?
You attach your shader to your material itself let is be a vertex shader, pixel shader. A pixel shader is different than a vertex shader in respect that it processes per pixel basis whereas vertex shader per vertex basis. But eventually shaders are used to render a gameobject itself.
You have to create a pixel shader? Why? What does it have to do?
Pixel shaders (more commonly called fragment shaders) are used in combination with vertex shaders (they're the next step in the rendering pipeline). You add them to the same .shader file in which you created your fragment shader, and there's examples in the link meat5000 has already provided.
Seeing as this is obviously homework, have you considered asking your $$anonymous$$cher for help?
Answer by tanoshimi · Nov 25, 2014 at 10:25 PM
Ah - ok. Unity shaders are written in CG ("C for Graphics") - a standard lanaguage that is similar to HLSL. You can view the method reference at http://http.developer.nvidia.com/Cg/index_stdlib.html
Your answer

Follow this Question
Related Questions
Simple Pixel Shader 3 Answers
Pixel snap for material made with Unlit Shader Graph? 1 Answer
Get the color value of a pixel in a texture or send data array 0 Answers
Get color of pixel before pass: prefer cg, shaderlab is last resort 0 Answers
Pixel errors when drawing to Render Target with shader 1 Answer