Skip to content

Commit

Permalink
updated to WEBGPU define
Browse files Browse the repository at this point in the history
  • Loading branch information
Martin Valigursky committed Jan 22, 2024
1 parent 07e172e commit c07195c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/framework/lightmapper/lightmapper.js
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ class Lightmapper {
const material = new StandardMaterial();
material.name = `lmMaterial-pass:${pass}-ambient:${addAmbient}`;
material.chunks.APIVersion = CHUNKAPI_1_65;
const transformDefines = '#define UV1LAYOUT\n' + (device.isWebGPU ? '#define UV1LAYOUT_FLIP\n' : '');
const transformDefines = '#define UV1LAYOUT\n';
material.chunks.transformVS = transformDefines + shaderChunks.transformVS; // draw into UV1 texture space

if (pass === PASS_COLOR) {
Expand Down
2 changes: 1 addition & 1 deletion src/scene/shader-lib/chunks/common/vert/transform.js
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ vec4 getPosition() {
vec4 screenPos;
#ifdef UV1LAYOUT
screenPos = vec4(vertex_texCoord1.xy * 2.0 - 1.0, 0.5, 1);
#ifdef UV1LAYOUT_FLIP
#ifdef WEBGPU
screenPos.y *= -1.0;
#endif
#else
Expand Down

0 comments on commit c07195c

Please sign in to comment.