Commit Graph

37 Commits

Author SHA1 Message Date
徐兵 7776fab6df fix toon outline thickness issue with vulkan (#15458) 2023-06-19 14:27:06 +08:00
oahc09 52484a619c refactor:xr 2d orthographic camera ui display effect (#14371) 2023-02-24 18:07:47 +08:00
minggo 313c58fe33 Improve utils api doc (#13922) 2022-12-28 15:04:56 +08:00
pandamicro afd22296b4 MIT license update and to new year 2023 (#13927)
* Cpp MIT license update and to date
* TS MIT license update and to date
2022-12-28 11:25:12 +08:00
徐兵 f924865ab7 Fix planar reflection culling failure in vulkan and metal (#13821)
* planar-reflection

* init reflection probe info

* fix error with unuse base3d

* revert

* init for native

* vulkan

* probetype

* clipSpaceMinZ
2022-12-16 14:11:06 +08:00
fqamic 51bd9bd705 fix: the orthogonal camera does not apply the xr fov parameters correctly (#13727)
* fix: the orthogonal camera does not apply the xr fov parameters correctly, resulting in the inability to focus under different IPDs.

* fix: code format abnormal
2022-12-08 09:50:59 +08:00
zhangxin fd665d36fc [fix] cc::scene::Camera::syncCameraEditor (#13673)
* [fix] cc::scene::Camera::syncCameraEditor

- remove ignore cc::scene::Camera::syncCameraEditor
- use const ptr instead of cosnt ref

* Update scene.i
2022-12-06 13:37:18 +08:00
江战 046a2b1378 Re-impl CC_ASSERT & CC_ASSERTF (#13588) 2022-12-05 17:12:30 +08:00
徐兵 68a89458ff optimize planar reflection culling (#13576) 2022-11-29 17:05:21 +08:00
hyde zhou 71a4452807 [develop] add camera usage (#12857) 2022-09-23 10:22:22 +08:00
林玮 785fd91511 Add multi-windows support (#12243)
Co-authored-by: bofeng.song <bofeng.song@chukong-inc.com>
2022-09-15 14:55:44 +08:00
oahc09 448c093cf4 improve:remove IXRInteraface's dependent from GFXDevice.h (#12690)
* improve:remove IXRInteraface's dependent from GFXDevice.h

* improve:remove IXRInteraface's redundant code from DeviceValidator.h/cpp
2022-09-06 17:44:46 +08:00
QingliWang 6a8f53b186 Add features for XR developement. (#12413)
* Change Android mainloop, add global config and template projects for XR.

* Change gfx/gles device's process flow for XR, working with other PRs, waiting.

* Change gfx/Vulkan device's process flow for XR, working with other PRs, waiting.

* Change render process for XR.

* Develop XR input and events.

* Develop 3D feature of UI widgets and raycast effect for XR.

Co-authored-by: fqamic <fqamic@vip.qq.com>
2022-08-22 16:34:45 +08:00
bofeng-song 836ad2211d fix screenPointToRay logic error (#12210)
* fix screenPointToRay logic error
2022-07-27 15:34:43 +08:00
James Chen ba4a98a71c Keep the struct in cc::Rect the same as which in ts (#11864)
Co-authored-by: Yiwen <15225434259xue@gmail.com>
2022-07-06 09:54:24 +08:00
Yiwen d1e141990b fix camera jsb (#11842)
* fix camera jsb
2022-07-05 11:38:11 +08:00
minggo 6bb5f9d447 use smart pointer and remove unneeded codes (#11750) 2022-06-30 17:01:17 +08:00
James Chen 174ba0eff2 Add macros: CC_USE_GEOMETRY_RENDERER and CC_USE_DEBUG_RENDERER to control these debugging features. (#11740) 2022-06-30 10:25:02 +08:00
李吉林 f3be7666a2 crop geometry renderer & debug renderer (#11752) 2022-06-29 17:16:17 +08:00
James Chen d5e1bfa1a1 Fix wrong logic in Camera::screenToWorld function and remove Node._xxxCache properties to keep the same logic as web (#11693)
* Fix wrong logic in Carmea::screenToWorld function.

* [jsb] Remove Node._xxxCache properties. Keep the same logic as web.

In camera-component.ts

    public screenToWorld (screenPos: Vec3, out?: Vec3) {
        if (!out) { out = this.node.getWorldPosition(); }  // if out is null, getWorldPosition will return _worldPositionCache object
        if (this._camera) { this._camera.screenToWorld(out, screenPos); }
        return out;
    }

In user code, there may be something like this:

	const target = cameraCom.screenToWorld(pos); // target is _worldPositionCache object
        const dir = Vec3.subtract(new Vec3(), target, this.node.worldPosition).normalize(); // this.node.worldPosition also returns _worldPositionCache object because we define _pos like the following:

// node.jsb.ts

Object.defineProperty(nodeProto, '_pos', {
    configurable: true,
    enumerable: true,
    get (): Readonly<Vec3> {
        return this.getWorldPosition();
    }
});

nodeProto.getWorldPosition = function (out?: Vec3): Vec3 {
    const r = oldGetWorldPosition.call(this);
    if (out) {
        return Vec3.copy(out, r);
    }
    return Vec3.copy(this._worldPositionCache, r); // node.getWorldPosition() will return _worldPositionCache tool.
};

So the code [[[[ const dir = Vec3.subtract(new Vec3(), target, this.node.worldPosition).normalize(); ]]]] will replace target value since this.node.worldPosition getter  overrides the target value.
2022-06-24 18:30:59 +08:00
GengineJS b353209223 Remove native camera scale matrix (#11487)
* Remove native camera scale matrix

* Change the position where the camera scale matrix is ​​removed
2022-06-14 14:07:57 +08:00
pandamicro 04b00e7fad Detach camera from scene in destroy 2022-06-09 15:32:27 +08:00
minggo 271cc5cf23 Remove some format rule (#10919)
* remove some rules
* format all codes with new format rule
2022-05-04 13:09:24 +08:00
李吉林 3457292707 refactor exit process (#10880)
* refactor exit process

* add override

* fix geometry-renderer missing in deferred pipeline

* invoke destroy directly

* fix ESLint error

* add -misc-static-assert for clang-tidy
2022-04-27 14:59:23 +08:00
bofeng-song 719315add2 fix editor to do (#10827) 2022-04-22 09:51:16 +08:00
minggo 444bfe31c4 Refactor CC_NEW/CC_DELETE (#10810)
* replace CC_NEW/CC_DELETE with ccnew/delete
2022-04-21 16:39:34 +08:00
minggo cb1234b63a Revert "fix memory leak (#10804)" (#10823)
This reverts commit 3374c7e41c.
2022-04-21 13:52:20 +08:00
李吉林 3374c7e41c fix memory leak (#10804) 2022-04-20 14:43:02 +08:00
Cocos Robot df50878b14 [ci skip][AUTO]: Automated clang-format update: 735860a2aa285979c890bad6356b14afeff13db5 (#10560) (#10570)
Co-authored-by: cocos-robot <cocos-robot@cocos.com>
2022-03-29 16:40:20 +08:00
minggo 1a9d49e4c6 replace std::list/std::array with ccstd::list/ccstd::array (#10560)
* replace std::list/std::array with ccstd::list/ccstd::array
2022-03-29 16:36:53 +08:00
李吉林 6c935352dd geometry renderer refactor (#10444) 2022-03-22 17:44:39 +08:00
Cocos Robot 24d84664f8 [ci skip][AUTO]: Automated clang-format update: 3de15842004cba2142ec0fecd82876d8f6a28236 (#10402) (#10424)
Co-authored-by: cocos-robot <cocos-robot@cocos.com>
2022-03-21 16:04:49 +08:00
minggo 34bf14269c unify stl (#10402)
* add ccstd::vector
* replace cc::vector with ccstd::vector 
* replace std::vector with ccstd::vector
* do not include <vector>
2022-03-21 15:55:02 +08:00
bofeng-song 48d8baf3ac implement logic of debug.ts (#10070)
* implement logic of debug.ts
2022-02-10 15:32:51 +08:00
mmyduckx e332c02ca0 add forward declaration for 3d/scene-graph/scene (#4246)
* add forward declaration for 3d/scene-graph/scene

* fix genbindings error

* define ctor in cpp
2022-02-09 15:41:00 +08:00
bofeng-song 8bdfbd60e2 implement syncCameraEditor for editor's logic & remove unneed code (#4197)
* implement syncCameraEditor  for editor's logic & remove unneed code
2022-01-19 16:13:48 +08:00
minggo 5410a48a58 Implement more logic in native (#4131)
Co-authored-by: bofeng.song <bofeng.song@chukong-inc.com>
Co-authored-by: dumganhar <dumganhar@gmail.com>
Co-authored-by: mmyduckx <308303735@qq.com>
Co-authored-by: Patrice Jiang <397136899@qq.com>
Co-authored-by: 江战 <40414978+PatriceJiang@users.noreply.github.com>
2022-01-07 18:39:40 +08:00