Skip to content

Commit b8277ef

Browse files
authored
Update PBRTerrain.vert
1 parent 36b0055 commit b8277ef

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

jme3-terrain/src/main/resources/Common/MatDefs/Terrain/PBRTerrain.vert

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ attribute vec2 inTexCoord;
88
varying vec2 texCoord;
99
varying vec3 wPosition;
1010
varying vec3 wNormal;
11-
11+
varying vec3 lPosition;
1212

1313
uniform vec4 g_AmbientLightColor;
1414

@@ -17,9 +17,6 @@ uniform vec4 g_AmbientLightColor;
1717
uniform vec3 g_CameraPosition;
1818
#endif
1919

20-
21-
varying vec4 lPosition;
22-
2320
void main(){
2421
vec4 modelSpacePos = vec4(inPosition, 1.0);
2522

@@ -31,7 +28,7 @@ void main(){
3128

3229
wNormal = normalize(TransformWorldNormal(inNormal));
3330

34-
lPosition = vec4(inPosition, 0.0);
31+
lPosition = modelSpacePos.xyz;
3532

3633
#ifdef USE_FOG
3734
fogDistance = distance(g_CameraPosition, (g_WorldMatrix * modelSpacePos).xyz);

0 commit comments

Comments
 (0)