- Home /
Global Rendering with a shader that uses a texture
Hi,
I'm starting with shaders and unity. I'd like to render a scene which is globally affected by a shader that uses a .dds texture. The shader takes red and green channels of this image for geometry correction(vertexs and so on...) and the blue channel for brightness. So it is pretty easy to create a material that uses this shader with a source image attached.
As far as I know, the usual way to do what I want is "Camera.SetReplacementShader". But what i have to use in this method is a shader but not a material. How can i do it for making use of the image? (because the source image can only be attached to a material and not to the shader itself, can't it?).
Thanks in advance
Answer by luizgpa · Dec 02, 2011 at 02:59 PM
You can pass the texture directly to a shader using Shader.SetGlobalTexture.
Your answer
Follow this Question
Related Questions
Render to Texture artifacts 0 Answers
How can i get mixed texture from one shader and set it for another object with another shader? 0 Answers
Change between 2 textures based on a variable 1 Answer
Rendering a G-Buffer for a cubemap 0 Answers
Blending normal texture and texture made with shader 0 Answers