Sky material: Don't render sky twice; cull back faces. Also disable useless depth writing.

experimental
shadowislord 10 years ago
parent 663225c71f
commit 8c2e9f687d
  1. 9
      jme3-core/src/main/resources/Common/MatDefs/Misc/Sky.j3md

@ -9,10 +9,6 @@ MaterialDef Sky Plane {
VertexShader GLSL100: Common/MatDefs/Misc/Sky.vert VertexShader GLSL100: Common/MatDefs/Misc/Sky.vert
FragmentShader GLSL100: Common/MatDefs/Misc/Sky.frag FragmentShader GLSL100: Common/MatDefs/Misc/Sky.frag
RenderState {
FaceCull Off
}
WorldParameters { WorldParameters {
ViewMatrix ViewMatrix
ProjectionMatrix ProjectionMatrix
@ -23,7 +19,10 @@ MaterialDef Sky Plane {
SPHERE_MAP : SphereMap SPHERE_MAP : SphereMap
EQUIRECT_MAP : EquirectMap EQUIRECT_MAP : EquirectMap
} }
RenderState {
DepthWrite Off
DepthFunc Equal
} }
Technique {
} }
} }
Loading…
Cancel
Save