- Home /
help needed: transparent texture vs water4
hey everyone! I kinda stuck with an odd problem: I've got my player ship shooting a missile with a "transparent-kind-of" explosing ( it's the heatwave from ben throop's detonator framework). everything is running fine, but when i add the water4 present into my scene, i get this annoying graphic issue:
you can clearly see the texture-box around the explosion. how can i solve this? :s
After experimenting for a while this is the result i obtained..
In the left you can see its working properly and in the right side the problem you mentioned.**Its two planes with the same material.One planes's normal towards camera and other plane's normal away from camera.**That is one plane Y rotation is zero and other plane Y rotation 180.
But i made a few changes to the distortion shader.I disabled back face culling,turned on depth writing and depth Testting Less than or equal.Just add this code to the beginning of the subshader block in your "HeatDistort" shader file.
Category
{
// We must be transparent, so other objects are drawn before this one
Tags { "Queue"="Transparent+100" "RenderType"="Opaque" }
//Tags {"Queue"="Transparent" "IgnoreProjector"="False" "RenderType"="Opaque"}
SubShader
{
//ADD these three lines
Cull off //Disable Backface culling
ZWrite on //Enable Depth writing
ZTest LEqual //$$anonymous$$ake Depth test Less than or equal
// This pass grabs the screen behind the object into a texture.
// We can access the result in the next pass as _GrabTexture
GrabPass
{
Name "BASE"
Tags { "Light$$anonymous$$ode" = "Always" }
}
Your answer
Follow this Question
Related Questions
Gui.Enable transperancy 4 Answers
Google Sketchup FBX problem 2 Answers
How to make Transparent/VertexLit shader work fine 3 Answers
transparent objects 0 Answers
Moving an object 1 Answer