Skip to content
This repository has been archived by the owner on Aug 7, 2024. It is now read-only.

Commit

Permalink
Adapter 1.2 api change of flipY (#956)
Browse files Browse the repository at this point in the history
  • Loading branch information
zhuxudong authored Feb 27, 2024
1 parent 7d86200 commit 33e92e7
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 5 deletions.
3 changes: 1 addition & 2 deletions playground/camera-depth-texture.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,13 +82,12 @@ async function main() {
function showDepthPlane(engine: Engine, camera: Entity): void {
const entity = camera.createChild("Plane");
entity.transform.setPosition(0, 0, -1);
entity.transform.rotate(new Vector3(-90, 0, 0));
entity.transform.rotate(new Vector3(90, 0, 0));
const renderer = entity.addComponent(MeshRenderer);
renderer.mesh = PrimitiveMesh.createPlane(engine,0.5,0.5);

// Create material
const material = new BaseMaterial(engine, Shader.find("RenderDepthTexture"));
material.renderFace = RenderFace.Double;
renderer.setMaterial(material);
}

Expand Down
1 change: 0 additions & 1 deletion playground/mrt.ts
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,6 @@ WebGLEngine.create({ canvas: "canvas" }).then((engine) => {
worldPos = renderer_ModelMat * vec4(POSITION, 1.0);
normal = renderer_ModelMat * vec4(NORMAL, 1.0);
gl_Position = renderer_MVPMat * vec4(POSITION, 1.0);
gl_Position.y *= -1.0;
}`;
const frag = `
varying vec4 worldPos;
Expand Down
4 changes: 2 additions & 2 deletions playground/screenshot.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ WebGLEngine.create({ canvas: "canvas" }).then((engine) => {
camera: Camera,
width: number,
height: number,
flipY = true,
flipY = false,
isPNG = true,
jpgQuality = 1
) {
Expand Down Expand Up @@ -152,7 +152,7 @@ WebGLEngine.create({ canvas: "canvas" }).then((engine) => {
const config = {
width: 1024,
height: 1024,
flipY: true,
flipY: false,
isPNG: true,
jpgQuality: 1,
screenshot: () => {
Expand Down
1 change: 1 addition & 0 deletions playground/transparent-shadow.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ void main() {
#include <common>
#include <uv_share>
#include <worldpos_share>
#include <camera_declare>
#include <ShadowFragmentDeclaration>
uniform vec4 material_BaseColor;
Expand Down

0 comments on commit 33e92e7

Please sign in to comment.