-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Conversation
* @zh | ||
* 静态灯光设置。 | ||
*/ | ||
get staticSettings () { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
需要添加 @property
@@ -32,6 +32,19 @@ class BuiltinResMgr { | |||
blackTexture.image = imgAsset; | |||
resources[blackTexture._uuid] = blackTexture; | |||
|
|||
// empty texture | |||
context.fillStyle = 'rgba(0,0,0,0)'; |
There was a problem hiding this comment.
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); |
There was a problem hiding this comment.
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 }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lighting map 听起来语法上不太对,lightmap 就好了吧
* 模型支持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
* 模型支持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
* 模型支持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
* 模型支持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
* 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>
* 模型支持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
Re: cocos-creator/2d-tasks#
Changes:
*