Quantcast
Channel: Questions in topic: "renderqueue"
Viewing all articles
Browse latest Browse all 161

Transparency render issue

$
0
0
I understand that this has been asked before but I've done *almost* everything to get it to work. This might be beyond the scope of my expertise because I barely messed with shaders which I'm saving for last in regards to learning Unity. Here's the problem as I'm sure you've seen before: ![alt text][1] So there are a lot of solutions out there but none that I understand. I tried the custom shader solution but I have a feeling that I'm adding the shader code incorrectly. I create a new shader, open the compiled shader, and replace the existing code with the solution code, correct? Or is there somewhere I place the code within the shader code that Unity provides in the shader? I also tried the 'creating the face at a distance from the main object as part of the object to force render priority' trick but that didn't work. Then there's renderQueue. I really have no idea how to use that or if it solves this problem. If any one of these answers is the correct solution, can you say step by step how to fix this seemingly minor problem rather than responding with vague external resources or solutions? I know that sounds rude but I see this problem as kind of an annoying obstacle that's taking time away from what I should be doing. Sorry, I have really bad OCD and I'd rather not get into writing my own shaders just yet. :) EDIT: They key is not rendering correctly which is spinning and some of the faces of the key are showing instead of the closer faces. I will need to fade this key out so that's why I'm using the transparent/specular shader. Here are some images...Unity's kind of being a pain right now so I'll need a minute. ![alt text][2] [1]: /storage/temp/16973-untitled.png [2]: /storage/temp/16975-untitled.png Edit: I did find something on this thread concerning Zwrite because the guy has the same problem but Zwrite doesn't seem to be in the shader. http://forum.unity3d.com/threads/41007-Transparent-Diffusr-shader-problem-Done Commented out Zwrite in the transparent/diffuse shader. Didn't work. Then I tried this shader: Shader "Transparent/VertexLit with Z" { Properties { _Color ("Main Color", Color) = (1,1,1,1) _SpecColor ("Spec Color", Color) = (1,1,1,0) _Emission ("Emissive Color", Color) = (0,0,0,0) _Shininess ("Shininess", Range (0.1, 1)) = 0.7 _MainTex ("Base (RGB) Trans (A)", 2D) = "white" {} } SubShader { Tags {"RenderType"="Transparent" "Queue"="Transparent"} // Render into depth buffer only Pass { ColorMask 0 } // Render normally Pass { ZWrite Off Blend SrcAlpha OneMinusSrcAlpha ColorMask RGB Material { Diffuse [_Color] Ambient [_Color] Shininess [_Shininess] Specular [_SpecColor] Emission [_Emission] } Lighting On SetTexture [_MainTex] { Combine texture * primary DOUBLE, texture * primary } } } } This strangely made the object disappear altogether. Sigh.

Viewing all articles
Browse latest Browse all 161

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>