Skip to content

Commit

Permalink
world vs finalWorld fix in shader material (#14469)
Browse files Browse the repository at this point in the history
* world vs finalWorld fix

* formatting
  • Loading branch information
RolandCsibrei committed Oct 28, 2023
1 parent 46f8a6f commit 3c073f2
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 6 deletions.
Expand Up @@ -371,7 +371,6 @@ export class GreasedLinePluginMaterial extends MaterialPluginBase implements IGr
vec3 grlNext = grl_nextAndCounters.xyz;
grlCounters = grl_nextAndCounters.w;
mat4 grlMatrix = viewProjection * finalWorld;
vec4 grlFinalPosition = grlMatrix * vec4( positionUpdated , 1.0 );
vec4 grlPrevPos = grlMatrix * vec4( grlPrevious + grlPositionOffset, 1.0 );
Expand Down
6 changes: 1 addition & 5 deletions packages/dev/core/src/Shaders/greasedLine.vertex.fx
Expand Up @@ -42,11 +42,7 @@ void main() {
vec3 grlNext = grl_nextAndCounters.xyz;
grlCounters = grl_nextAndCounters.w;

#ifdef INSTANCES
mat4 grlMatrix = viewProjection * finalWorld ;
#else
mat4 grlMatrix = viewProjection * world ;
#endif
mat4 grlMatrix = viewProjection * finalWorld ;

vec3 grlPositionOffset = grl_offsets;
vec4 grlFinalPosition = grlMatrix * vec4( position + grlPositionOffset , 1.0 );
Expand Down

0 comments on commit 3c073f2

Please sign in to comment.