From 8c2e9f687d5e3628c98bbae558e286112d08fe47 Mon Sep 17 00:00:00 2001 From: shadowislord Date: Sun, 1 Feb 2015 17:19:10 -0500 Subject: [PATCH] Sky material: Don't render sky twice; cull back faces. Also disable useless depth writing. --- .../main/resources/Common/MatDefs/Misc/Sky.j3md | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/jme3-core/src/main/resources/Common/MatDefs/Misc/Sky.j3md b/jme3-core/src/main/resources/Common/MatDefs/Misc/Sky.j3md index 2e2aa4f8f..3d5ab9ea2 100644 --- a/jme3-core/src/main/resources/Common/MatDefs/Misc/Sky.j3md +++ b/jme3-core/src/main/resources/Common/MatDefs/Misc/Sky.j3md @@ -2,17 +2,13 @@ MaterialDef Sky Plane { MaterialParameters { TextureCubeMap Texture Boolean SphereMap - Boolean EquirectMap + Boolean EquirectMap Vector3 NormalScale } Technique { VertexShader GLSL100: Common/MatDefs/Misc/Sky.vert FragmentShader GLSL100: Common/MatDefs/Misc/Sky.frag - RenderState { - FaceCull Off - } - WorldParameters { ViewMatrix ProjectionMatrix @@ -21,9 +17,12 @@ MaterialDef Sky Plane { Defines { SPHERE_MAP : SphereMap - EQUIRECT_MAP : EquirectMap + EQUIRECT_MAP : EquirectMap + } + + RenderState { + DepthWrite Off + DepthFunc Equal } - } - Technique { } } \ No newline at end of file