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

model component support lighting map #6796

Merged
merged 2 commits into from
Jun 2, 2020
Merged

model component support lighting map #6796

merged 2 commits into from
Jun 2, 2020

Conversation

MSoft1115
Copy link
Contributor

Re: cocos-creator/2d-tasks#

Changes:
*

@pandamicro pandamicro requested a review from YunHsiao June 1, 2020 08:17
* @zh
* 静态灯光设置。
*/
get staticSettings () {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

需要添加 @property

@pandamicro pandamicro merged commit c44bff5 into cocos:3d Jun 2, 2020
@@ -32,6 +32,19 @@ class BuiltinResMgr {
blackTexture.image = imgAsset;
resources[blackTexture._uuid] = blackTexture;

// empty texture
context.fillStyle = 'rgba(0,0,0,0)';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

如果这个没法返回透明通道为 0 的贴图的话,其实用 black-texture 是不是就好了

GFXAddress.CLAMP,
GFXAddress.CLAMP,
]);
sampler = samplerLib.getSampler(this._device, samplerHash);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

最好直接缓存起来?

public static SIZE: number = UBOLocal.COUNT * 4;

public static BLOCK: GFXUniformBlock = {
binding: UniformBinding.UBO_LOCAL, name: 'CCLocal', members: [
{ name: 'cc_matWorld', type: GFXType.MAT4, count: 1 },
{ name: 'cc_matWorldIT', type: GFXType.MAT4, count: 1 },
{ name: 'cc_lightingMapUVParam', type: GFXType.FLOAT4, count: 1 },
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lighting map 听起来语法上不太对,lightmap 就好了吧

pandamicro pushed a commit that referenced this pull request Jun 2, 2020
* 模型支持lighting map渲染

* change static lighting settings
# Conflicts:
#	cocos/core/3d/builtin/effects.ts
#	cocos/core/3d/framework/model-component.ts
#	cocos/core/renderer/scene/model.ts
pandamicro pushed a commit that referenced this pull request Jun 3, 2020
* 模型支持lighting map渲染

* change static lighting settings
# Conflicts:
#	cocos/core/3d/builtin/effects.ts
#	cocos/core/3d/framework/model-component.ts
#	cocos/core/renderer/scene/model.ts
pandamicro pushed a commit to pandamicro/fire-engine that referenced this pull request Jun 12, 2020
* 模型支持lighting map渲染

* change static lighting settings
# Conflicts:
#	cocos/core/3d/builtin/effects.ts
#	cocos/core/3d/framework/model-component.ts
#	cocos/core/renderer/scene/model.ts

# Conflicts:
#	cocos/core/3d/builtin/effects.ts
pandamicro pushed a commit to pandamicro/fire-engine that referenced this pull request Jun 14, 2020
* 模型支持lighting map渲染

* change static lighting settings
# Conflicts:
#	cocos/core/3d/builtin/effects.ts
#	cocos/core/3d/framework/model-component.ts
#	cocos/core/renderer/scene/model.ts

# Conflicts:
#	cocos/core/3d/builtin/effects.ts
pandamicro added a commit that referenced this pull request Jun 14, 2020
* model component support lighting map (#6796)

* 模型支持lighting map渲染

* change static lighting settings
# Conflicts:
#	cocos/core/3d/builtin/effects.ts
#	cocos/core/3d/framework/model-component.ts
#	cocos/core/renderer/scene/model.ts

# Conflicts:
#	cocos/core/3d/builtin/effects.ts

* Update effects

Co-authored-by: Myway <MSoft1115@hotmail.com>
pandamicro pushed a commit that referenced this pull request Jun 17, 2020
* 模型支持lighting map渲染

* change static lighting settings
# Conflicts:
#	cocos/core/3d/builtin/effects.ts
#	cocos/core/3d/framework/model-component.ts
#	cocos/core/renderer/scene/model.ts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants