Plane Culling Problem on my model in Gaussian Splat

I have my own unlit shader that I created in Unity. It is a transparent shader. When the camera is looking from one side, the water plane which is on the Gaussian Splat can be seen in the 3D model but from the other side, the Gaussian grass can be seen, even though the water planes are there.

Hi Samsmeep, thank you for your detailed explanation!
Let’s break down your problem and find a solution.

Plan:

  1. Explain how transparency & culling work in Unity shaders (and relevance to Needle/Three.js).
  2. Suggest troubleshooting steps for one-sided transparency in unlit shaders.
  3. Offer a possible fix for double-sided rendering.

Step-by-step Plan (Pseudocode):

  • Review the unlit shader code.
  • Check if the shader has a culling mode active (Cull Back or Cull Front).
  • If planes are single-sided (default), they render only one face. From behind, they disappear due to backface culling.
  • For transparency:
    • Ensure proper blending (Blend SrcAlpha OneMinusSrcAlpha).
    • Ensure “ZWrite Off” if needed.
  • For two-sided water plane:
    • Set shader to Cull Off so geometry is shown from both sides.
  • (Optional) Fix sorting issues if transparent objects overlap.

Example: Two-sided Transparent Unlit Shader (Unity ShaderLab)

Shader "Custom/UnlitTransparentDoubleSided"
{
    Properties
    {
        _MainTex ("Texture", 2D) = "white" {}
        _Color ("Color", Color) = (1,1,1,1)
    }
    SubShader
    {
        Tags { "Queue"="Transparent" "RenderType"="Transparent" }
        LOD 100

        Pass
        {
            Cull Off
            ZWrite Off
            Blend SrcAlpha OneMinusSrcAlpha

            CGPROGRAM
            #pragma vertex vert
            #pragma fragment frag
            #include "UnityCG.cginc"

            struct appdata { float4 vertex : POSITION; float2 uv : TEXCOORD0; };
            struct v2f { float2 uv : TEXCOORD0; float4 vertex : SV_POSITION; };

            sampler2D _MainTex;
            float4 _Color;

            v2f vert (appdata v)
            {
                v2f o;
                o.vertex = UnityObjectToClipPos(v.vertex);
                o.uv = v.uv;
                return o;
            }

            fixed4 frag (v2f i) : SV_Target
            {
                return tex2D(_MainTex, i.uv) * _Color;
            }
            ENDCG
        }
    }
}

Key section: Cull Off
This draws both sides of the plane.


Tips:

  • If you export to Needle Engine/Three.js, set material.side = THREE.DoubleSide on the material for similar effect.
  • For multiple transparent layers, Z-sorting can get tricky.
  • Inspect in editor: Is the plane mesh double-sided? Is your splat blocking it?

If you can provide your shader code and more context about your model export settings, I can make a more concrete suggestion!


Next Steps for You:

  • Double-check if your Unity shader or exported material is set to two-sided.
  • Try the suggested shader code above.
  • If possible, share a snippet of your shader and more info about your export workflow.

Would you like conversion help for this shader in Needle Engine/Three.js, or help debugging your Unity shader specifically?

How to ask good questions:
Include shader code, material setup, and export steps for the best help!

1 replies left - Get a PRO license for more AI replies.
thread_gswECTQg1d3Ar8qaEI2ZOxEz
Reply to this post directly if you need further help (bottom right button)

btw I made the shader in the URP Unlit shader graph