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

fix(engine): Clipspace #2274

Merged
merged 1 commit into from
Sep 23, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions modules/engine/src/models/clip-space.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,19 +35,19 @@ fn vertexMain(inputs: VertexInputs) -> FragmentInputs {

const CLIPSPACE_VERTEX_SHADER = /* glsl */ `\
#version 300 es
in vec2 clipSpacePosition;
in vec2 texCoord;
in vec2 coordinate;
in vec2 clipSpacePositions;
in vec2 texCoords;
in vec2 coordinates;

out vec2 position;
out vec2 coordinate;
out vec2 uv;

void main(void) {
gl_Position = vec4(clipSpacePosition, 0., 1.);
position = clipSpacePosition;
coordinate = coordinate;
uv = texCoord;
gl_Position = vec4(clipSpacePositions, 0., 1.);
position = clipSpacePositions;
coordinate = coordinates;
uv = texCoords;
}
`;

Expand Down Expand Up @@ -78,9 +78,9 @@ export class ClipSpace extends Model {
topology: 'triangle-strip',
vertexCount: 4,
attributes: {
clipSpacePosition: {size: 2, value: new Float32Array(POSITIONS)},
texCoord: {size: 2, value: new Float32Array(TEX_COORDS)},
coordinate: {size: 2, value: new Float32Array(TEX_COORDS)}
clipSpacePositions: {size: 2, value: new Float32Array(POSITIONS)},
texCoords: {size: 2, value: new Float32Array(TEX_COORDS)},
coordinates: {size: 2, value: new Float32Array(TEX_COORDS)}
}
})
});
Expand Down
Loading