Skip to content

Commit

Permalink
Examples: Volume shaders clean up.
Browse files Browse the repository at this point in the history
  • Loading branch information
mrdoob committed Aug 3, 2020
1 parent d0db382 commit a5c63ac
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions examples/webgl2_volume_instancing.html
Expand Up @@ -64,12 +64,12 @@
out vec3 vDirection;
void main() {
vec4 worldPosition = modelViewMatrix * instanceMatrix * vec4( position, 1.0 );
vec4 mvPosition = modelViewMatrix * instanceMatrix * vec4( position, 1.0 );
vOrigin = vec3( inverse( instanceMatrix * modelMatrix ) * vec4( cameraPos, 1.0 ) ).xyz;
vDirection = position - vOrigin;
gl_Position = projectionMatrix * worldPosition;
gl_Position = projectionMatrix * mvPosition;
}
`;

Expand Down
4 changes: 2 additions & 2 deletions examples/webgl2_volume_perlin.html
Expand Up @@ -91,12 +91,12 @@
out vec3 vDirection;
void main() {
vec4 worldPosition = modelViewMatrix * vec4( position, 1.0 );
vec4 mvPosition = modelViewMatrix * vec4( position, 1.0 );
vOrigin = vec3( inverse( modelMatrix ) * vec4( cameraPos, 1.0 ) ).xyz;
vDirection = position - vOrigin;
gl_Position = projectionMatrix * worldPosition;
gl_Position = projectionMatrix * mvPosition;
}
`;

Expand Down

0 comments on commit a5c63ac

Please sign in to comment.