Skip to content

Commit

Permalink
sharedMaterial case update (cocos#401)
Browse files Browse the repository at this point in the history
  • Loading branch information
LinYunMo authored Jan 21, 2021
1 parent 612f83b commit 73492a5
Show file tree
Hide file tree
Showing 9 changed files with 395 additions and 94 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,6 @@ CCEffect %{
CCProgram sprite-vs %{
precision highp float;
#include <cc-global>
#if USE_LOCAL
#include <cc-local>
#endif

in vec3 a_position;
in vec2 a_texCoord;
Expand All @@ -38,11 +35,7 @@ CCProgram sprite-vs %{
vec4 vert () {
vec4 pos = vec4(a_position, 1);

#if USE_LOCAL
pos = cc_matViewProj * cc_matWorld * pos;
#else
pos = cc_matViewProj * pos;
#endif
pos = cc_matViewProj * pos;

uv0 = a_texCoord;

Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1,11 @@
{"ver":"1.4.3","importer":"effect","imported":true,"uuid":"ef6ed931-33e2-4f9b-8630-f9add33c3787","files":[".json"],"subMetas":{},"userData":{}}
{
"ver": "1.4.4",
"importer": "effect",
"imported": true,
"uuid": "ef6ed931-33e2-4f9b-8630-f9add33c3787",
"files": [
".json"
],
"subMetas": {},
"userData": {}
}
9 changes: 1 addition & 8 deletions assets/cases/ui/20.sharedMaterial/color.effect
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,6 @@ CCEffect %{
CCProgram sprite-vs %{
precision highp float;
#include <cc-global>
#if USE_LOCAL
#include <cc-local>
#endif

in vec3 a_position;
in vec2 a_texCoord;
Expand All @@ -37,11 +34,7 @@ CCProgram sprite-vs %{
vec4 vert () {
vec4 pos = vec4(a_position, 1);

#if USE_LOCAL
pos = cc_matViewProj * cc_matWorld * pos;
#else
pos = cc_matViewProj * pos;
#endif
pos = cc_matViewProj * pos;

uv0 = a_texCoord;

Expand Down
2 changes: 1 addition & 1 deletion assets/cases/ui/20.sharedMaterial/color.effect.meta
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"ver": "1.4.3",
"ver": "1.4.4",
"importer": "effect",
"imported": true,
"uuid": "55148da8-d553-4387-a97c-92eb8ec1129c",
Expand Down
8 changes: 4 additions & 4 deletions assets/cases/ui/20.sharedMaterial/custom-texture.mtl
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,19 @@
],
"_states": [
{
"rasterizerState": {},
"depthStencilState": {},
"blendState": {
"targets": [
{}
]
},
"depthStencilState": {},
"rasterizerState": {}
}
}
],
"_props": [
{
"mainTexture": {
"__uuid__": "248e6857-004c-4cc5-b6a2-ed91f4130b3e@6c48a"
"__uuid__": "fd9b4ba7-7bb6-4796-be02-9176ad420e4c@6c48a"
}
}
]
Expand Down
Binary file added assets/cases/ui/20.sharedMaterial/gold.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
82 changes: 82 additions & 0 deletions assets/cases/ui/20.sharedMaterial/gold.png.meta
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
{
"ver": "1.0.21",
"importer": "image",
"imported": true,
"uuid": "fd9b4ba7-7bb6-4796-be02-9176ad420e4c",
"files": [
".png",
".json"
],
"subMetas": {
"6c48a": {
"importer": "texture",
"uuid": "fd9b4ba7-7bb6-4796-be02-9176ad420e4c@6c48a",
"displayName": "gold",
"id": "6c48a",
"name": "texture",
"ver": "1.0.20",
"imported": true,
"files": [
".json"
],
"subMetas": {},
"userData": {
"wrapModeS": "repeat",
"wrapModeT": "repeat",
"minfilter": "linear",
"magfilter": "linear",
"mipfilter": "none",
"premultiplyAlpha": false,
"anisotropy": 1,
"isUuid": true,
"imageUuidOrDatabaseUri": "fd9b4ba7-7bb6-4796-be02-9176ad420e4c"
}
},
"f9941": {
"ver": "1.0.9",
"importer": "sprite-frame",
"uuid": "fd9b4ba7-7bb6-4796-be02-9176ad420e4c@f9941",
"imported": true,
"files": [
".json"
],
"subMetas": {},
"userData": {
"wrapModeS": "repeat",
"wrapModeT": "repeat",
"minfilter": "linear",
"magfilter": "linear",
"mipfilter": "none",
"premultiplyAlpha": false,
"anisotropy": 1,
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 80,
"height": 80,
"rawWidth": 80,
"rawHeight": 80,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"isUuid": true,
"imageUuidOrDatabaseUri": "fd9b4ba7-7bb6-4796-be02-9176ad420e4c@6c48a",
"atlasUuid": "",
"packable": false
},
"displayName": "gold",
"id": "f9941",
"name": "spriteFrame"
}
},
"userData": {
"type": "sprite-frame",
"redirect": "fd9b4ba7-7bb6-4796-be02-9176ad420e4c@f9941",
"hasAlpha": true
}
}
Loading

0 comments on commit 73492a5

Please sign in to comment.