Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

world vs finalWorld fix in shader material #14469

Merged
merged 3 commits into from Oct 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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