Skip to content

Commit

Permalink
Update PBRTerrain.vert
Browse files Browse the repository at this point in the history
  • Loading branch information
yaRnMcDonuts authored Feb 6, 2025
1 parent 36b0055 commit b8277ef
Showing 1 changed file with 2 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ attribute vec2 inTexCoord;
varying vec2 texCoord;
varying vec3 wPosition;
varying vec3 wNormal;

varying vec3 lPosition;

uniform vec4 g_AmbientLightColor;

Expand All @@ -17,9 +17,6 @@ uniform vec4 g_AmbientLightColor;
uniform vec3 g_CameraPosition;
#endif


varying vec4 lPosition;

void main(){
vec4 modelSpacePos = vec4(inPosition, 1.0);

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

wNormal = normalize(TransformWorldNormal(inNormal));

lPosition = vec4(inPosition, 0.0);
lPosition = modelSpacePos.xyz;

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

0 comments on commit b8277ef

Please sign in to comment.