- Home /
Shader for overlaying textures
Hello! I need some help. I try to understand the way shaders work and how to apply it to my problem.
Here is my problem: I have a dark NGUI texture. I want to draw it with transparent areas in fixed positions and with fixed sizes. I try to resolve this with overlaying textures and custom shader. But I can't find a proper shader for this purpose. I start to learn ShaderLab but it seems to me, that it needs much time.
Does anyone had such problem and managed to find an easy solution? I'd really appreciate any help on this issue.
Thanks for any advice.
Answer by tanoshimi · Jan 13, 2015 at 11:46 AM
You can determine the screen space position of a pixel in the fragment shader using screenPos in a surface shader or the ComputeScreenPos macro.
How can I send these parameters to shader in runtime? $$anonymous$$y texture has more than one area that should be transparent. In other words I want to create one big texture, few small and locate these small textures over one big. All areas under small textures should be transparent. Can I achieve it with shaders?
Your answer
Follow this Question
Related Questions
Semi transparent Object behind walls? 1 Answer
Is there a way to get scene color after transparent pass in URP using the new 2D Renderer ? 0 Answers
Z-priming alpha-per-vertex 0 Answers
Transparent terrain shader not working 2 Answers
Unlit Transparent Cutout shader that can switch between two textures 0 Answers